Rendly

Convert HTML to PDF using Rendly

Convert HTML

AI-generated

Overview

This node converts HTML content into PDF documents using the Rendly API. It supports converting raw HTML content or using predefined Rendly templates with variables. Users can customize PDF options such as page format, orientation, margins, headers, footers, and rendering behavior. This node is useful for generating PDF reports, invoices, or documents dynamically from HTML content or templates.

Use Case Examples

  1. Convert a simple HTML string to a PDF invoice with custom margins and header/footer templates.
  2. Generate a PDF report using a Rendly template by passing variables to populate the template.
  3. Check the status of a PDF conversion job by providing the job ID.

Properties

Name Meaning
HTML Content The raw HTML content to convert into a PDF document.
Options Various PDF rendering options including page format, orientation, margins, header/footer templates, wait times, custom CSS, and output filename.

Output

Binary

The node outputs the generated PDF file as binary data with MIME type 'application/pdf'.

JSON

  • filename - The name of the generated PDF file.
  • size - The size of the PDF file in bytes.
  • mimeType - The MIME type of the output file, always 'application/pdf'.
  • templateId - (Only for template conversion) The ID of the template used for PDF generation.

Dependencies

  • Rendly API accessed via an API key credential

Troubleshooting

  • Authentication errors (HTTP 401) indicate invalid or missing API key credentials; verify and update the API key.
  • Invalid request errors (HTTP 400) suggest malformed input parameters, such as invalid JSON in template variables; ensure all inputs are correctly formatted.
  • Rate limit errors (HTTP 429) mean too many requests have been sent in a short time; wait and retry later.
  • If the PDF output is empty or corrupted, check the HTML content and options for correctness.
  • Network or API endpoint issues can cause request failures; verify network connectivity and API URL configuration.

Discussion