PDF4me icon

PDF4me

Comprehensive PDF and document processing: generate barcodes, convert files, extract data, manipulate images, and automate workflows with the PDF4ME API

Actions80

Overview

This node converts a web page URL into a PDF document. It is useful when you want to capture the content of any publicly accessible or authenticated webpage as a PDF file for archiving, sharing, or further processing. For example, you can convert an online article, a report dashboard, or a dynamically generated webpage into a PDF format automatically within your workflow.

The node supports authentication for websites requiring basic login credentials and allows customization of the PDF output such as page layout, format, margins, scaling, and whether to include background graphics or headers/footers.

Properties

Name Meaning
Web URL The URL of the web page that you want to convert into a PDF document.
File Name The desired name of the output PDF file including the .pdf extension.
Authentication Type The type of authentication required to access the target website. Options: "No Authentication", "Basic Authentication".
Username Username for basic authentication if required by the target website.
Password Password for basic authentication if required by the target website.
Page Layout Orientation of the PDF pages. Options: "Portrait" or "Landscape".
Page Format The paper size format for the PDF. Options include standard sizes like A0 through A8, Executive, Legal, Statement, Tabloid.
Binary Data Output Name Custom name for the binary data field in the node's output where the PDF file content will be stored.
Advanced Options Collection of additional optional settings:
- Bottom Margin (e.g., 20px, 1cm)
- Left Margin
- Right Margin
- Top Margin
- Display Header Footer (boolean)
- Print Background (boolean)
- Scale (number between 0.1 and 2)
- Custom Profiles (JSON string for advanced API options)

Output

The node outputs the converted PDF as binary data under the specified binary data output name (default is data). This binary data represents the actual PDF file content which can be saved, sent, or processed further in the workflow.

The JSON output contains metadata about the operation and references the binary data. The binary data can be used directly in subsequent nodes that accept file inputs.

Dependencies

  • Requires internet access to fetch the web page from the provided URL.
  • If authentication is needed, valid username and password must be supplied.
  • Uses an external PDF conversion service API (implied by the bundled source code referencing pdf4me actions).
  • Requires configuration of an API key credential or similar authentication token for the external PDF conversion service (not shown explicitly but implied).

Troubleshooting

  • Invalid URL or unreachable website: Ensure the URL is correct and accessible from the n8n environment.
  • Authentication failures: Verify username and password are correct if Basic Authentication is selected.
  • PDF generation errors: Check advanced options for invalid margin or scale values; use defaults if unsure.
  • Empty or corrupted PDF output: Confirm the target webpage is fully loaded and does not block automated requests.
  • API quota or permission issues: Make sure the API key or authentication token for the PDF conversion service is valid and has sufficient permissions.

Links and References

Discussion