Free plan

Image(s) to PDF

Turn pictures into a PDF document
POST
/v1/images/pdf

About this tool

Puts your pictures into PDF files. You can make one PDF with all pictures, one page each, or a separate PDF for every picture. You can choose the page size (A4, Letter or fitted to the picture), the page direction and the margin.
For example, you combine photos of a signed paper into one PDF to e-mail.

How to use it

  1. Choose this tool.
  2. Add one or more pictures with Upload or drag and drop, in page order.
  3. Choose one PDF for all pictures, or one per picture.
  4. Choose the page size, then press Generate.
  5. Download your PDF.

What you get back

You get a PDF file (or one for each picture) that you can download.
TEST IT LIVE

Try Image(s) to PDF 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
Images
Plan
Free
Method
POST
Endpoint
/v1/images/pdf
Tool ID
images.pdf
Authentication
API key
Accepts
JPEG, PNG, WEBP, GIF, AVIF, TIFF +15 more
Background jobs
Yes
Usage group
Image
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/images/pdf" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'images=@photo.jpg' \
  -F 'mode=perImage' \
  -F 'pageSize=auto' \
  -F 'orientation=portrait'

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.images.pdf({
    "images": 'photo.jpg',
    "mode": "perImage",
    "pageSize": "auto",
    "orientation": "portrait"
  });
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->images()->pdf([
    'images' => 'photo.jpg',
    'mode' => 'perImage',
    'pageSize' => 'auto',
    'orientation' => 'portrait',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Turn pictures into a PDF document.

Image(s) to PDF accepts JPEG, PNG, WEBP, GIF, AVIF, TIFF, SVG, SVGZ, BMP, ICO, APNG, PNM and 9 more. You can send several files in one request.

Image(s) to PDF is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/images/pdf 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.