n8n node to generate PDF from text or table data.
npm install n8n-nodes-pdf-generationThe PDF Generation Node in n8n allows you to generate PDF files from text or table data. This node supports flexible content types, including plain text and tables, and can generate a downloadable PDF document. You can easily integrate this node into your workflow to automate document creation tasks.
To use the PDF Generation Node, you first need to have n8n installed. If you don't have it yet, please refer to the n8n installation guide.
Text: Plain text content.Table: Table data (custom logic required for handling table data).TextEnter the content to include in the PDF...output.pdffalseHere’s an example of how to use the PDF Generation node:
json
{
"contentType": "text",
"content": "This is a sample PDF document generated by n8n.",
"filename": "sample-output.pdf",
"autoDownload": true
}
`
$3
The output will be a base64 encoded PDF file and the filename specified:
`json
{
"json": {
"filename": "sample-output.pdf",
"pdf": "base64-encoded-pdf-content"
},
"binary": {
"data": {
"mimeType": "application/pdf",
"data": "base64-encoded-pdf-content",
"fileName": "sample-output.pdf"
}
}
}
``