Pandoc Md To icon

Pandoc Md To

Pandoc Markdown to PDF or docx

Pandoc Md To

AI-generated

Overview

This node converts Markdown files to either PDF or DOCX format using the Pandoc command-line tool. It is useful for automating document conversions within workflows, such as generating reports, documentation, or formatted outputs from Markdown content. For example, it can convert a Markdown file stored in binary data to a PDF report or a DOCX document with optional reference styling.

Use Case Examples

  1. Convert a Markdown file to PDF for sharing or printing.
  2. Convert Markdown to DOCX using a reference DOCX template for consistent styling.

Properties

Name Meaning
Binary Property Name of the binary property that contains the Markdown file to convert.
Reference Docx Name of the binary property that contains the DOCX file to use as a reference template when converting to DOCX format.
To Format Output format for the converted document, either PDF or DOCX.
Additional Options Additional command-line options to pass to the Pandoc command for customization.

Output

JSON

  • json - Original input JSON data passed through.
    binary - Binary data of the converted file, encoded in base64, with MIME type and file name.

Dependencies

  • Pandoc command-line tool must be installed and accessible in the system environment.

Troubleshooting

Error 'No binary data found in property ""' indicates the specified binary property does not exist or is empty in the input data. Verify the property name and input data.

  • Pandoc command errors are reported with the error message from the command's stderr output. Check the additional options and input file content for correctness.
  • If the output file does not exist after conversion, it indicates a failure in the Pandoc process. Ensure Pandoc is installed and the input file is valid.

Links

Discussion