npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

n8n-nodes-pdf-generation

v0.1.0

Published

n8n node to generate PDF from text or table data.

Downloads

105

Readme

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

  1. Text PDF: If the content type is set to "text," the provided content is inserted into the PDF as plain text.
  2. 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.)