Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
PDF → Convert HTML to PDF
AI-generatedOverview
This node provides a utility to convert HTML content into a PDF document. It supports two input modes: either by specifying a URL of a webpage or by providing raw HTML code directly. The node then processes this input and generates a PDF file from the HTML content.
Common scenarios where this node is beneficial include:
- Automatically generating PDF reports or invoices from dynamic HTML templates.
- Archiving web pages as PDFs for offline access or record keeping.
- Creating printable documents from custom HTML content without manual conversion tools.
For example, you could use this node to convert a dynamically generated invoice webpage into a downloadable PDF file that can be emailed to customers.
Properties
| Name | Meaning |
|---|---|
| Source Type | Choose between "URL" (convert a webpage) or "HTML Code" (convert provided HTML content). |
| HTML Content | Raw HTML code to convert to PDF (used if Source Type is "HTML Code"). |
| Website URL | URL of the webpage to convert to PDF (used if Source Type is "URL"). |
| Return as URL | Boolean option to return the resulting PDF as a downloadable URL instead of raw binary data. |
| File Name | Desired name for the output PDF file. |
Output
The node outputs JSON data representing the result of the conversion. Depending on the "Return as URL" property:
- If
Return as URLis false, the output will contain the PDF file data in binary form suitable for further processing or saving. - If
Return as URLis true, the output will provide a URL pointing to the downloadable PDF file.
The exact structure includes fields for the PDF content or the URL, along with metadata such as the filename.
Dependencies
- Requires an API key credential for authentication with the external PDF conversion service.
- The node sends a POST request to the
/pdf/htmlendpoint of the configured API base URL. - No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
- Invalid URL or unreachable webpage: If the URL provided is incorrect or the webpage cannot be accessed, the conversion will fail. Verify the URL is correct and publicly accessible.
- Malformed HTML content: Providing invalid or incomplete HTML may cause errors or unexpected PDF output. Ensure the HTML is well-formed.
- API authentication errors: Missing or invalid API credentials will prevent the node from working. Confirm the API key is correctly configured.
- Large HTML content or complex pages: Very large or complex HTML inputs might time out or exceed service limits. Try simplifying the HTML or splitting content.
- File naming issues: Avoid using special characters in the file name to prevent issues with file handling.
Links and References
- 0CodeKit API Documentation (for general API reference)
- General HTML to PDF conversion concepts: https://en.wikipedia.org/wiki/HTML_to_PDF