2 creditsPDF to HTML API — structure preserved
Responsive semantic HTML or pixel-faithful fixed layout — your choice per request.
PDF to HTML converts a PDF into web-ready HTML in one REST call. Responsive mode rebuilds the content as semantic markup — h1–h6, paragraphs, lists, tables and images — that reflows on any screen; fixed mode preserves absolute positioning for visual fidelity. Headings, tables, lists and links survive the conversion. Two credits per document.
How does the PDF to HTML API work?
One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.
curl -X POST https://www.ashdocs.com/api/v1/tools/pdf-to-html \
-H "X-API-Key: ash_live_..." \
-F "files=@annual-report.pdf" \
-F 'options={"mode":"responsive","inline_images":true}'Common use cases
- →Publishing PDF reports as indexable web pages
- →In-browser document viewers
- →Migrating legacy PDFs into a CMS
Frequently asked questions
Does the HTML look exactly like the PDF?+
In fixed mode, yes — page geometry is reproduced with absolute positioning. Responsive mode trades exact appearance for semantic HTML that reflows, indexes and works with screen readers.
Can I convert a scanned PDF to HTML?+
Run OCR first — a scan contains images of text, not text. Chain the /ocr endpoint before /pdf-to-html and the conversion works normally.
What happens to images inside the PDF?+
With inline_images enabled they are embedded as data URIs inside the returned HTML. Disabled, the response is a ZIP containing the HTML plus extracted image assets.
Do tables survive the conversion?+
Simple ruled tables convert to real <table> markup. Heavily merged or borderless tables are best extracted with /pdf-to-table instead and rendered from data.