Pandoc icon

Pandoc

使用 Pandoc 命令行将二进制文档转换为指定格式,通过 PANDOC_PATH 环境变量指定可执行路径

Pandoc

AI-generated

Summary

Convert documents between supported formats using the Pandoc CLI, accepting input either as binary file data or plain text and producing output as text in JSON fields or as binary files.

Inputs

  • inputSource (required) — Selects input data source: either binary file data or text content.
  • binaryPropertyName (required) — The binary property name containing the input file to convert (required if inputSource is binary).
  • textContent (required) — The input text content to convert (required if inputSource is text).
  • fromFormat (required) — The input document format; if 'auto', the format is inferred from the input file extension when input is binary.
  • toFormat (required) — The desired output document format: markdown, text, or docx.
  • outputFieldName — JSON field name to store output text content when output format is text or markdown.
  • outputBinaryPropertyName — Binary property name to store output file when output format is docx.
  • extraArgs — Additional Pandoc command-line arguments to customize the conversion.
  • passthroughData — Whether to merge the input JSON data into the output JSON.

Output shape

A list of JSON items matching input count; each item contains converted content either as text in a JSON field or as binary file data.

If output is textual (markdown or text), content is returned in a JSON field named by 'outputFieldName'. If output is binary (docx), content is returned as binary data under 'outputBinaryPropertyName'. Upstream JSON data can be optionally merged into output. Each input item corresponds to one output item.

Links

Discussion