Skip to main content

Signature


Parameters

str | pymupdf.Document
required
Path to the document file, or an already-opened pymupdf.Document instance. Supports PDF, XPS, eBooks, and — with PyMuPDF Pro — Office formats.
various
Additional parameters are shared with to_markdown(). See the to_markdown() API reference for details.
For other parameters, see the shared to_markdown() API reference which applies to all extraction functions.

Returns

list
A list of page objects, one per extracted page. See JSON Schema for the full field reference.See Extract JSON for detailed block structure examples.

Raises


Examples

Minimal

Iterate over blocks


See Also

Extract JSON Guide

Full walkthrough with bounding boxes, span flags, and pipeline examples.

JSON Schema

Complete field reference for every object in the JSON output.

to_markdown()

Markdown output for LLM ingestion and readable docs.

Tables Guide

Working with table blocks in the JSON output.