Skip to main content

Using the DynamicPDF API in n8n Workflows

· 4 min read
James A. Brannan
Developer Evangelist

By combining DynamicPDF API and its powerful document-processing endpoints with n8n automation and scheduling capabilities, you can build end-to-end solutions that dynamically generate reports, combine files, or analyze PDFs. In this blog post we provide nine ready-made example workflows for download.

n8n is an open-source workflow automation platform that lets developers visually connect APIs, services, and data flows without heavy coding. It supports nodes for HTTP requests, file operations, data transformations, and other operations. You can easily integrate DynamicPDF API into your n8n workflows throughout HTTP Request node, enabling automated PDF generation, merging, conversion, and metadata extraction directly within your workflows.

tip

See the tutorial Using n8n Workflows with the DynamicPDF API for more information on using n8n with the DynamicPDF API.

This document describes nine example n8n workflows that run locally and integrate with the DynamicPDF Cloud API. All workflows execute in a local n8n installation and write output files to the /temp/n8n-examples/output/ directory.

dlex-layout-local.json

Generates a PDF with the dlex-layout endpoint by reading a .json layout data file and a .dlex template from disk. Code nodes rename the binary properties to data_json and data_dlex, preparing a multipart form submission. The request posts to DynamicPDF and writes the PDF to /temp/n8n-examples/output/dlex-local-out.pdf.

pdf-merge-files.json

Merges multiple file types into a single PDF using the pdf endpoint. Inputs include two PDFs, a Word document, a PNG image, and an HTML page. Each file is read from disk, renamed (for example data_pdf1, data_word, data_img), combined into multipart form-data, and posted. The merged PDF is saved to /temp/n8n-examples/output/pdf-local-out.pdf.

pdf-merge-json.json

Merges two PDFs using base64-encoded JSON rather than multipart form-data. The workflow downloads two IRS forms, converts them to Base64 with a Code node, and sends a JSON body that declares both inputs and resources to the pdf endpoint. The merged output is written to /temp/n8n-examples/output/merged-pdfs-example.pdf.

pdf-info.json

Retrieves document information from a local PDF via the pdf-info endpoint. It reads book.pdf, posts it as binary with Content-Type: application/pdf, and returns JSON with properties such as page count, file size, and metadata.

pdf-security-info.json

Inspects encryption and digital signatures using the pdf-security-info endpoint. It reads aes256-sig.pdf, posts the file as binary, and receives details about encryption type, permissions, and signature information.

pdf-text.json

Extracts text content from selected pages of a PDF with the pdf-text endpoint. It reads book.pdf and uses query parameters startPage=20 and pageCount=10 to return JSON text for those pages.

pdf-xmp.json

Retrieves XMP metadata (XML-based descriptive metadata) from a PDF using the pdf-xmp endpoint. It reads fw4.pdf, posts it to the API, and writes the resulting XML to /temp/n8n-examples/output/xmp-metadata.xml.

image-info.json

Retrieves image metadata using the image-info endpoint. It downloads a PNG (DynamicPDF logo), posts the binary image, and returns JSON describing dimensions, color depth, format, and compression.

dlex-layout-cloud.json

Combines a local JSON layout with a .dlex template stored in DynamicPDF Cloud Storage using the dlex-layout endpoint. The workflow references samples/dlex-layout/SimpleReportWithCoverPage.dlex and saves the generated PDF to /temp/n8n-examples/output/dlex-layout-cloud-out.pdf.

Summary

These nine local workflows demonstrate how to automate PDF creation, merging, inspection, and metadata extraction with the DynamicPDF Cloud API from n8n. They cover binary and JSON-based uploads, multipart construction, text and metadata extraction, security inspection, and reading/writing files from disk, providing a solid foundation for integrating DynamicPDF into local n8n automation pipelines.



© 2025 DynamicPDF. All rights reserved.