n8n-nodes-pdflib-wrapper
v0.1.1
Published
A collection of nodes for the PDFLib library
Readme

n8n-nodes-starter
This repo contains example nodes to help you get started building your own custom integrations for n8n. It includes the node linter and other dependencies.
To make your custom node available to the community, you must create it as an npm package, and submit it to the npm registry.
Prerequisites
You need the following installed on your development machine:
- git
- Node.js and pnpm. Minimum version Node 18. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL here. For Windows users, refer to Microsoft's guide to Install NodeJS on Windows.
- Install n8n with:
pnpm install n8n -g - Recommended: follow n8n's guide to set up your development environment.
Using this starter
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the documentation.
- Generate a new repository from this template repository.
- Clone your new repo:
git clone https://github.com/<your organization>/<your-repo-name>.git - Run
pnpm ito install dependencies. - Open the project in your editor.
- Browse the examples in
/nodesand/credentials. Modify the examples, or replace them with your own nodes. - Update the
package.jsonto match your details. - Run
pnpm lintto check for errors orpnpm lintfixto automatically fix errors when possible. - Test your node locally. Refer to Run your node locally for guidance.
- Replace this README with documentation for your node. Use the README_TEMPLATE to get started.
- Update the LICENSE file to use your details.
- Publish your package to npm.
More information
Refer to our documentation on creating nodes for detailed information on building your own nodes.
License
n8n-nodes-pdflib-wrapper
This is an n8n community node that wraps the functionality of the pdf-lib library, allowing you to extract form field information from PDF files within your n8n workflows.
Installation
Using n8n CLI
# Install the node package
npm install n8n-nodes-pdflib-wrapper@latest
# Also install the required pdf-lib dependency
npm install pdf-lib@latestAdding to your n8n instance
- Go to Settings > Community Nodes
- Click on Install
- Enter
n8n-nodes-pdflib-wrapperin the "npm package name" field - Click on Install
- After installation, restart your n8n instance
Node Features
Get Form Fields
Extracts form field information from a PDF file, including:
- Field names
- Field types (text, checkbox, radio button, dropdown, etc.)
- Current values
- Options for choice fields
- Required status
Usage
Input
The node accepts binary data containing a PDF file. You can connect any node that outputs binary data, such as:
- HTTP Request
- Read Binary File
- Webhook (with file upload)
Configuration
- Input Binary Field: Specify the name of the binary property containing the PDF file. If left empty, the node will automatically use the first available binary property.
- Options:
- Include Field Metadata: Enable to include additional metadata about each field, such as read-only status, exact field type, and appearance information
Output
The node outputs a JSON object containing:
pdfFields: An array of form field objectssource: Information about the binary property used
Each field object includes:
name: The name of the form fieldtype: The type of form field (text, checkbox, radio, dropdown, etc.)value: The current value of the fieldoptions: Available options for dropdown fields- When Include Field Metadata is enabled:
metadata.isReadOnly: Whether the field is read-onlymetadata.fieldType: The exact PDF field typemetadata.hasAppearance: Whether the field has visual appearance settings
Example Workflows
Extract PDF Form Fields
- Use the Read Binary File node to read a PDF form
- Connect it to the PDF-lib Wrapper node
- Configure the PDF-lib Wrapper to use the binary data property
- The output will contain all form field information
