Documents & data.
Create, read and reshape documents & data. Build PDFs from HTML, Markdown, images, .docx or invoice/receipt/report templates; merge, split, select, rotate, watermark and number pages; read or set metadata; read or fill forms. Convert .docx/.xlsx/.csv to Markdown, and rows of data to a spreadsheet. Extract structured JSON, summarize, or answer questions over any document with AI. Pure-JS edits run in milliseconds; rendering and AI run on the edge. Every operation is also an MCP tool — one end of the document-to-web pipeline, on the same key as web capture.
Operations
22 operations, priced each
Prices are per successful call. 1 unit = $0.002; the free tier covers 500 units a month.
HTML → PDF
Render an HTML document to a pixel-accurate PDF.
render_html_to_pdfMerge
Combine two or more PDFs into one, in order.
merge_pdfsSelect pages
Keep exactly the pages you want.
select_pagesRotate
Rotate every page by 90, 180 or 270 degrees.
rotate_pdfWatermark
Stamp a diagonal text watermark across every page.
watermark_pdfExtract text
Pull clean text (and metadata) out of a PDF — for RAG, search and agents.
extract_pdf_textMarkdown → PDF
Render Markdown to a clean, print-styled PDF — for reports and agent output.
markdown_to_pdfImages → PDF
Combine PNG/JPEG images into a PDF, one image per page.
images_to_pdfSplit
Split one PDF into many — one file per page, or by page ranges.
split_pdfRead form
List a PDF's form fields — names, types, values and options.
read_pdf_formFill form
Fill a PDF's form fields from a JSON map; optionally flatten.
fill_pdf_formPage numbers
Stamp page numbers on every page — position, start value and format are yours.
number_pdfPDF info
Read a PDF's metadata and structure — title, author, page count and size.
pdf_infoSet metadata
Set a PDF's title, author, subject, keywords or creator.
set_pdf_metadataDOCX → text
Extract clean text from a Word .docx — for RAG, search and agents.
docx_to_textDOCX → PDF
Convert a Word .docx into a clean, print-styled PDF.
docx_to_pdfData → spreadsheet
Turn rows of JSON into a downloadable XLSX or CSV — the generation mirror of File → Markdown.
data_to_spreadsheetFile → Markdown
Convert a Word (.docx), Excel (.xlsx) or CSV file into clean Markdown — for RAG, agents and pipelines.
file_to_markdownGenerate document
Render a branded PDF from a named template — invoice, receipt or report. Money computed for you.
render_documentExtract data
Name the fields you want — from a URL, PDF or Office file (.docx/.xlsx/.csv) — and get them back as structured JSON.
extract_dataSummarize
AI summary of a web page, PDF, Office file or raw text — grounded, no fabrication.
summarize_documentAnswer from document
Ask a question and get an answer grounded ONLY in a URL, PDF, Office file or text.
answer_from_documentFull price table · Every parameter, in the interactive reference
Quickstart
From curl
# Merge two PDFs ($0.002) curl https://api.preteworks.com/v1/pdf/merge \ -H "Authorization: Bearer YOUR_API_KEY" \ -F files=@a.pdf -F files=@b.pdf -o merged.pdf # Render HTML to a PDF ($0.01) curl https://api.preteworks.com/v1/pdf/html \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: text/html" \ --data-binary '<h1>Invoice #123</h1>' -o invoice.pdf
From an AI agent instead? Add the MCP server — the same operations appear as tools.