Extract PDF to Markdown
Convert PDFs into markdown files with embedded HTML to preserve complex document structure.
Extract PDF to Markdown converts PDF files into markdown documents, using embedded HTML where needed to preserve tables, headers, and other structure that plain markdown can't express on its own. This is useful when you need a readable, structured text representation of a document rather than a row-and-column CSV.
Availability: Requires the
WorkflowsPdfExtractionfeature. Contact your OneSchema support representative if you do not see this transform.
What it does
- Input: one or more files (PDFs).
- Output: one markdown file per input file, with HTML markup preserved for complex layout elements such as tables and multi-column sections.
- The transform uses an AI model to read the PDF's visual structure and reproduce it as markdown, rather than extracting specific rows into a CSV.
When to use it
- You need to feed PDF content into downstream text processing, search indexing, or LLM pipelines that expect markdown.
- The source document is a report, contract, or manual with headings, nested lists, and tables rather than a single flat table.
- You want a human-readable text version of a PDF for review or archiving.
How to configure it
In the MFF builder, add an Extract PDF to Markdown node after the node that produces the PDF files.
Settings
| Setting | Description | Default |
|---|---|---|
| Prompt | Optional plain-language instructions to guide the conversion, such as which sections to include or skip. | Empty |
| Include page markers | When enabled, the output markdown includes markers indicating where each source page begins. Useful for tracing content back to the original document. | On |
Prompt tips
- Use the prompt to exclude boilerplate:
"Skip the legal disclaimer on the last page." - Use it to call out structure you care about:
"Preserve all tables as HTML tables."
Example
Input
A five-page policy manual PDF with headings, a table of contents, and two data tables.
Output
A markdown file with #/## headings for each section and <table> HTML blocks in place of the original tables, with page markers indicating the source page for each section.
Troubleshooting
Tables look garbled in the output
- Complex, merged-cell tables can be hard for the model to reproduce. Try adding a prompt hint such as
"Preserve the table exactly as an HTML table."
Output is missing content from later pages
- Very long PDFs may need to be split first. Add a Split PDF by page or Split PDF by content node upstream.
I need rows and columns, not markdown
- Use Extract PDF data instead, which is designed to emit CSV rows rather than markdown text.
See also
Updated about 7 hours ago