Skip to main content

Ejemplos

Convert a user upload (Bun.serve)

Convert a batch of files to disk

Bun.write complements Bun.file: the entire pipeline (reading PDF, sending to API, writing the result) avoids unnecessary buffering.

PDF large with page range

Combine it with pdfIndex to know what range to order without downloading the entire PDF client-side.

BYOS: upload the result directly to your storage

With outputUrl, the API uploads the Markdown directly to your storage and returns a lightweight JSON instead of the full body. See Compression for outputEncoding.

Pipeline RAG with pdfIndex

See PDF Index for AI agents.

Process a ZIP

The file size and quantity limits within ZIP are in Limits. An out-of-range ZIP returns 413, which SDK converts to MarkpdfPayloadTooLargeError.