Programmable Media

Create PDF files from images

Last updated: May-07-2024

You can create a PDF file from images stored in your Cloudinary storage. Identify the images you want to include in the PDF by applying the same tag to each of the images. In the resulting PDF, they are ordered alphabetically by public ID with a page per image.

Create the PDF

Use the multi method of the Upload API to create the PDF file. PDF files can be created from a maximum of 500 images if processed asynchronously (async parameter = true) or a maximum of 100 if synchronously (async = false). If the limit is exceeded, only the first 500 (or 100) images will be included.

For example, to create a PDF file from a set of images that each have the tag "topic", use the multi method, specifying the format as pdf, and optionally add some transformations to each of the images that are added:

Deliver the PDF

To deliver the PDF, use the Cloudinary image delivery URL with type set to multi. For example, to deliver the PDF created from all images with the tag topic:

Learn more about the multi method in the Upload API reference.

Important
By combining multiple images in this way, the resulting PDF may exceed the maximum file size allowed in your plan, in which case you will see the error, "File size too large." Consider using a transformation on each of the images, using the transformation parameter, to reduce the size of the images so as to reduce the size of the resulting PDF file.

✔️ Feedback sent!

Rate this page: