0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions108

Overview

This node provides a versatile set of no-code utilities grouped under various resources, including PDF operations. Specifically, the "Markdown to Pdf" operation converts a Markdown string into a PDF document. This is useful when you want to generate PDF reports, documentation, or formatted printable content from Markdown text dynamically within an automation workflow.

Common scenarios include:

  • Automatically generating PDF invoices, reports, or summaries from Markdown templates.
  • Converting user-generated Markdown content into downloadable PDFs.
  • Applying custom CSS styles to control the appearance of the generated PDF.

Example: You have a Markdown-formatted report stored in a variable or received from another node, and you want to convert it into a styled PDF file for emailing or archiving.

Properties

Name Meaning
Code Variables A collection of code variables where each variable has a name (selected from a list or specified by expression) and a value. These can be used to inject dynamic values into code-based functions (not directly relevant for Markdown to PDF but available in the node).
Get File as URL Boolean option to specify whether the resulting PDF should be returned as a URL link instead of raw binary data.
Markdown String The source Markdown text that will be converted into a PDF document.
CSS Custom CSS styles to modify the appearance of the Markdown content in the generated PDF.

Output

The output JSON contains the result of the conversion. If "Get File as URL" is false, the PDF is likely returned as binary data attached to the output item (though exact binary handling is not explicitly shown in the snippet). If "Get File as URL" is true, the output includes a URL pointing to the generated PDF file.

The output structure typically includes:

  • json: An object with metadata or status about the PDF generation.
  • binary: (if applicable) The actual PDF file data.
  • Or a URL string referencing the location of the generated PDF.

Dependencies

  • Requires an API key credential for authentication with the external service powering the utilities.
  • The node makes HTTP POST requests to endpoints structured as /pdf/markdownstringtopdf with parameters including the Markdown string and optional CSS.
  • No other external dependencies are indicated.

Troubleshooting

  • Common issues:
    • Invalid or empty Markdown input may cause errors or produce empty PDFs.
    • Incorrect CSS syntax could lead to unexpected styling or failure in rendering.
    • Network or authentication errors if the API key is missing or invalid.
  • Error messages:
    • Errors thrown during execution will be caught and can be optionally continued on fail.
    • Typical errors might relate to malformed input, missing required parameters, or API request failures.
  • Resolutions:
    • Ensure Markdown input is valid and non-empty.
    • Validate CSS before use.
    • Verify API credentials and network connectivity.

Links and References


Note: This summary is based solely on static analysis of the provided source code and property definitions without runtime execution.

Discussion