MoPDF icon

MoPDF

Extract text from PDFs, convert pages to images and generate AI-ready output — without any API, running entirely local inside n8n.

Extract Text

AI-generated

Summary

Extract text from PDF files by specifying which pages to process and the desired format of the extracted text.

Inputs

  • Pages — Choose 'All Pages' to extract text from the entire document, or 'Specific Pages' to target specific pages.
  • Page Numbers — When 'Specific Pages' is selected, provide a comma-separated list of page numbers (e.g., "1,2,5") to extract text from.
  • Text Output Format — Select the format of the extracted text: Plain Text, Markdown (with formatting), JSON (structured data), or HTML (with full structure).
  • Output Mode — Choose 'Per Page' to output one item per page with its extracted text, or 'Combined Text' to output a single item with all pages' text combined.
  • Page Separator — When 'Combined Text' output mode is set, specify the string separator between pages. Supports escape sequences like \n, \t, etc.
  • Include Metadata — Optionally include PDF metadata such as title, author, and other info in the output JSON.
  • Text Only — If enabled, output contains only the extracted text field without page number, statistics, or metadata.
  • Input Binary Property (required) — Name of the input binary property holding the PDF file data (default is 'data').

Output shape

a list of items, each containing extracted text from specified PDF pages

Each output item includes properties such as pageNumber, totalPages, text, characterCount, and wordCount unless 'Text Only' is enabled, in which case only the text field is included. Metadata is included only if requested. 'Per Page' mode produces one output item per page; 'Combined Text' mode produces a single combined output item containing all pages' text joined by the specified separator.

Links

Discussion