Convert, merge, split, OCR, parse and barcode-scan documents with one JSON API. OpenPDF is a complete, self-hosted PDF.co-style platform — your server, your data.
curl -X POST https://pdf.rochlabs.online/v1/pdf/convert/to/text \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/invoice.pdf",
"inline": true}'
{
"body": "INVOICE INV-2026-0042 ...",
"url": "https://pdf.rochlabs.online/f/9c1d.../invoice.txt",
"pageCount": 2,
"credits": 4, "remainingCredits": 61236,
"error": false, "status": 200
}
Every operation follows the same request/response contract: send JSON with a file url, get back a result url — or run it async with job/check polling and webhooks.
/v1/pdf/convert/to/textExtract plain text from a PDF (layout-aware)./v1/pdf/convert/to/jsonStructured JSON: per-page text, dimensions and detected tables./v1/pdf/convert/to/csvDetected tables as CSV (falls back to text lines)./v1/pdf/convert/to/xmlXML document with per-page text nodes./v1/pdf/convert/to/htmlSimple HTML rendition of the PDF text./v1/pdf/convert/to/imageRender pages to PNG/JPG/WEBP/TIFF images./v1/pdf/convert/from/htmlHTML string or web page URL to PDF./v1/pdf/convert/from/urlAlias of from/html for web pages./v1/pdf/convert/from/imageOne or more images (JPG/PNG/WEBP/TIFF) into a single PDF./v1/pdf/mergeMerge PDFs (and images) into one document./v1/pdf/splitSplit by page ranges; each comma token becomes one output PDF./v1/pdf/edit/rotateRotate pages by 90/180/270 degrees./v1/pdf/edit/delete-pagesRemove pages from the document./v1/pdf/edit/addStamp text, watermarks and images onto pages (top-left coordinates)./v1/pdf/edit/fillFill AcroForm fields ({fieldName: value})./v1/pdf/optimizeCompress a PDF (lossless; or rasterize=true for maximum reduction)./v1/pdf/security/addEncrypt with user/owner passwords (AES-256)./v1/pdf/security/removeRemove password protection (requires the password)./v1/pdf/makesearchableOCR scanned pages into a searchable PDF (tesseract)./v1/pdf/makeunsearchableRasterize pages so text cannot be selected or extracted./v1/pdf/infoMetadata, page count, encryption and form detection./v1/pdf/findFind text (or regex) with page + coordinates of each match./v1/pdf/documentparserTemplate-driven field extraction (regex templates) or automatic key/value sweep./v1/ai-invoice-parserInvoice fields (number, dates, totals, tax, IBAN…) without a template./v1/pdf/forms/infoList fillable form fields with types, values and options./v1/pdf/attachments/extractExtract embedded file attachments./v1/barcode/generateGenerate QR / Code128 / EAN13 / UPC-A... as PNG./v1/barcode/readRead barcodes/QR from an image or PDF pages.Pass "async": true and poll /v1/job/check, or give a callback URL and get webhooked when the document is ready.
Every operation bills base + per-page credits against your monthly plan, with live remainingCredits in each response.
Results live on signed links that expire per your plan (60 min – 24 h), with automatic disk cleanup.
Three ways in: multipart upload, presigned PUT URLs, or pull from any public URL / base64.
Billing is simulated in self-hosted mode — switch plans freely from the dashboard.