> ## Documentation Index
> Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt
> Use this file to discover all available pages before exploring further.

# Create PDFs from images in Node.js (video tutorial)


## Overview

Learn how to create PDF documents from multiple images using Cloudinary's Node.js SDK. This tutorial demonstrates how to organize images with tags and automatically generate PDFs from tagged image collections, perfect for creating photo albums, reports, or document compilations programmatically.

You'll discover how to upload images with custom tags, retrieve images by tag, and use Cloudinary's multi-image PDF generation feature to create professional documents from your image assets.

## Video tutorial

  This video is brought to you by Cloudinary's video player - embed your own!Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.

## Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.### Introduction to PDF generation
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=00 :player=cld} | PDFs are a popular format for business documents and widely accepted file types. Cloudinary makes it easy to generate PDFs from images in your product environment. |

### Tagging images for PDF generation
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=16 :player=cld} | Learn how to tag images in your product environment so they can be grouped together for PDF generation. Tags serve as metadata that allows you to retrieve specific image collections programmatically. |

### Creating PDFs with the Node.js SDK
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=0 :sec=47 :player=cld} | Set up a Node.js script to generate PDFs from tagged images using the `cloudinary.uploader.multi()` [Admin API method](image_upload_api_reference#multi). Configure transformations including width, crop mode, and gravity settings for optimal PDF layout. |

### Configuring PDF transformations
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=1 :sec=18 :player=cld} | Apply transformations to ensure images fit properly in the PDF format, including setting width to 800px, using fill crop mode, and automatic gravity for optimal image positioning. |

### Security settings for PDF delivery
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=2 :sec=08 :player=cld} | By default, PDF and ZIP files are blocked for security. To enable PDF delivery, navigate to the [Security](https://console.cloudinary.com/app/settings/security) page of the Console Settings and check **Allow delivery of PDF and ZIP files**. |

### Dynamic PDF generation with uploads
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=2 :sec=36 :player=cld} | Create a dynamic workflow that uploads multiple images with tags and immediately generates a PDF. Perfect for applications where users upload images that need to be compiled into documents. |

### Uploading and tagging images programmatically
{table:class=tutorial-bullets}|  | 
| --- | --- |
|{videotime:id=media :min=3 :sec=33 :player=cld} | Use a loop to upload multiple images with consistent tags, then generate a PDF from the newly uploaded and tagged images using the same multi-image PDF generation technique. |

```node.js
const images = [
    "./images/sample.jpg",
    "./images/sample-2.jpg"
];

for (const image of images){
    await cloudinary.uploader.upload(image,{
        tags: "vacation"
    });
}
```
## Keep learning

> **READING**:
>
> * Watch more [Dev Hints videos](https://www.youtube.com/playlist?list=PL8dVGjLA2oMpaTbvoKCaRNBMQzBUIv7N8) on the [Cloudinary YouTube channel](https://www.youtube.com/cloudinary).

> * Learn more about [image transformations](image_transformations) for advanced image processing.

> * Explore the [Node.js SDK](node_integration) for backend integration capabilities.

> * Discover more transformations in the [Transformation URL API reference](transformation_reference).

> * See how PDF generation fits into [programmatic asset workflows](upload_images).

## If you like this, you might also like...

  
  
  
    Upload Programmatically
    Use a Cloudinary SDK to upload media assets 
  

  
  
  
    Configure the Node.js SDK
    Install and configure the Cloudinary Node.js SDK 
  

  
  
  
    Transformation Basics
    Learn the basics of a transformation URL 
  

&nbsp;

&nbsp;Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.
&nbsp;