Free plan

PDF to one long image

Stack PDF pages into one tall picture to share easily
POST
/v1/pdfs/to-long-image

About this tool

This tool places the pages of a PDF one below the other in a single tall picture, like a scrolling screenshot of the whole document. You choose the pages, the width, the space and colour between pages, and the picture type (PNG, JPEG or WebP). Very long documents may be refused if the picture would be too tall.
For example, you turn a two-page price list into one picture you can post in a chat or on social media.

How to use it

  1. Choose this tool.
  2. Add your PDF.
  3. Choose which pages to include.
  4. Choose the picture type, and if you like the width and the gap between pages.
  5. Press Generate, then download the picture.

What you get back

You get one tall picture of your pages, ready to download and share.
GOOD TO KNOW
A very long document is refused when the picture would pass the height limit: choose pages, lower dpi or width. Counts as one PDF operation.
TEST IT LIVE

Try PDF to one long image in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/to-long-image
Tool ID
pdfs.to-long-image
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/to-long-image" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'pages=1-3' \
  -F 'dpi=100' \
  -F 'width=800'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.toLongImage({
    "file": 'document.pdf',
    "pages": "1-3",
    "dpi": 100,
    "width": 800
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->toLongImage([
    'file' => 'document.pdf',
    'pages' => '1-3',
    'dpi' => 100,
    'width' => 800,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Stack the chosen pages of a PDF top to bottom into one tall picture (PNG, JPEG or WebP): a scrolling screenshot of the document for chats, web pages and social posts.

PDF to one long image accepts PDF. You can send several files in one request.

PDF to one long image is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/pdfs/to-long-image with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.