🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

n8n-nodes-pdf-generation

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n8n-nodes-pdf-generation

n8n node to generate PDF from text or table data.

0.1.0
latest
Source
npm
Version published
Weekly downloads
171
-10.47%
Maintainers
0
Weekly downloads
 
Created
Source

PDF Generation Node

The 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.

Features:

  • Content Type Options: Choose between text or table data for your PDF content.
  • Customizable Filename: Define a custom filename for the generated PDF.
  • Auto Download Option: Enable automatic download of the generated PDF once it's created.

Installation

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.

Node Settings

1. Content Type (options)

  • Description: Select the type of content to include in the generated PDF.
  • Options:
    • Text: Plain text content.
    • Table: Table data (custom logic required for handling table data).
  • Default: Text

2. Content (string)

  • Description: Provide the text or table data to be included in the PDF. The content will be inserted into the generated PDF.
  • Default: Empty
  • Placeholder: Enter the content to include in the PDF...

3. Filename (string)

  • Description: Specify the name of the PDF file generated.
  • Default: output.pdf

4. Auto Download (boolean)

  • Description: Choose whether to automatically download the PDF once it's generated.
  • Default: false

Example Workflow

Here’s an example of how to use the PDF Generation node:

Input Data:

{
  "contentType": "text",
  "content": "This is a sample PDF document generated by n8n.",
  "filename": "sample-output.pdf",
  "autoDownload": true
}

Output:

The output will be a base64 encoded PDF file and the filename specified:

{
  "json": {
    "filename": "sample-output.pdf",
    "pdf": "base64-encoded-pdf-content"
  },
  "binary": {
    "data": {
      "mimeType": "application/pdf",
      "data": "base64-encoded-pdf-content",
      "fileName": "sample-output.pdf"
    }
  }
}

Example Usage

  • Text PDF: If the content type is set to "text," the provided content is inserted into the PDF as plain text.
  • Table PDF: If the content type is set to "table," you would need to customize the logic to insert table data into the PDF. (You can use libraries or custom formatting to handle tables.)

Keywords

n8n-community-node-package

FAQs

Package last updated on 08 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts