How to upload, manage, and deliver PDF files
Last updated: May-16-2026
Cloudinary offers robust support for uploading, managing, transforming, and delivering PDF files, along with third-party integrations for converting documents and extracting text.
Uploading PDF files
You can upload PDF files using any of the options available for uploading files to your Cloudinary account. To support transformations on your PDF files, these are uploaded as an image resource type by default.
Uploading a password-protected PDF file as an image resource type is not supported. If necessary, you can upload a password-protected PDF by hard-coding the resource_type to raw in the upload command.
Delivering PDF files
You can deliver original PDFs using standard Cloudinary delivery URLs. Alternatively, you can convert and deliver individual PDF pages as images by changing the file extension. If you change the extension of a PDF's delivery URL to an image format, then by default, the first page is delivered as an image in the format you specify, but you can use the page transformation parameter (pg in the URL) to deliver any individual page.
You can also apply advanced transformations, like cropping or adding overlays, when delivering PDF pages as images.
For example, cropping out a specific 300×300 square from the second page, with rounded corners and a black background:
Creating PDF files from images
You can use the multi method to merge all images tagged with the same tag into a single multi-page PDF. The newly created PDF includes each image as a separate page, all ordered alphanumerically by their public ID. If you want the images to be included in a specific order, make sure their public ID values are alphabetized accordingly (e.g., 01img, 02img, etc).
For example using the Node SDK, to create a PDF file from all images that have the tag "animal", and limit all images to a size of 400×600:
Converting Office documents to PDFs
To automatically convert Office documents, spreadsheets, or presentations to PDF documents, you can use the Aspose document conversion add-on.
After registering for the add-on, upload the Office file to your Cloudinary account as a raw file while setting the raw_convert parameter to aspose. Once the conversion has finished, a PDF with the same public ID is added to your Cloudinary account as an image resource type (the original is also uploaded as a raw resource type).
For example, using the Node SDK:
In the example above, a new image (PDF) is added called sample_doc.docx, and can be delivered and/or transformed just like any other PDF uploaded to your account.
Extracting text from PDFs
Cloudinary's OCR Text Detection and Extraction add-on allows you to identify the location of text on a PDF page, and extract, and analyze text from PDFs, which can be useful for correct cropping without cutting off text, tagging PDF files, redacting content, or analyzing it for any other purpose. After registering to the add-on, you can request the detected text by adding the ocr parameter with a value of adv_ocr:document. For example, when using the upload method using the Node SDK:
Rasterizing PDFs
Rasterizing a PDF is useful if you want to deliver a PDF, but also want to resize the file, or maybe add an overlay. Rasterization reduces the PDF to a single flat pixelated layer (as opposed to vector-based multiple layers). Simply add the rasterize flag to the dynamic URL (fl_rasterize) and add any resizing or overlays as desired.
The following example using the Node SDK rasterizes a PDF, scales it down to a width of 800 pixels, and adds a Cloudinary logo to the top right corner of each page: