PDF to HTML API

Convert PDF pages to fixed-layout HTML for display in your website or application.

From PDF pages to HTML

PDF pages flow through the PDF to HTML API and return as fixed-layout HTML.

Convert a PDF to HTML with one API call

Convert a local PDF into a self-contained HTML file.

curl --fail --user "demo:demo" \
  --form "input_format=pdf" \
  --form "output_format=html" \
  --form "file=@input.pdf" \
  --output "document.html" \
  https://api.pdfcrowd.com/convert/24.04/
import pdfcrowd

api = pdfcrowd.PdfToHtmlClient("demo", "demo")
api.convertFileToFile("input.pdf", "document.html")
<?php
require "pdfcrowd.php";

$api = new \Pdfcrowd\PdfToHtmlClient("demo", "demo");
$api->convertFileToFile("input.pdf", "document.html");
var pdfcrowd = require("pdfcrowd");
var api = new pdfcrowd.PdfToHtmlClient("demo", "demo");
api.convertFileToFile("input.pdf", "document.html",
    function(error, fileName) {
        if (error) return console.error(error);
        console.log("Created " + fileName);
    });
import com.pdfcrowd.*;

Pdfcrowd.PdfToHtmlClient api =
    new Pdfcrowd.PdfToHtmlClient("demo", "demo");
api.convertFileToFile("input.pdf", "document.html");
pdfcrowd.PdfToHtmlClient api =
    new pdfcrowd.PdfToHtmlClient("demo", "demo");
api.convertFileToFile("input.pdf", "document.html");
require "pdfcrowd"

api = Pdfcrowd::PdfToHtmlClient.new("demo", "demo")
api.convertFileToFile("input.pdf", "document.html")
package main

import "github.com/pdfcrowd/pdfcrowd-go"

func main() {
    api := pdfcrowd.NewPdfToHtmlClient("demo", "demo")
    err := api.ConvertFileToFile("input.pdf", "document.html")
    if err != nil {
        panic(err)
    }
}

Use a file or a URL

Upload a PDF, send its binary data, or provide its URL. PDFCrowd converts the selected pages into HTML that represents the PDF's text, images, and page layout. Choose embedded resources for a self-contained HTML file or separate resources packaged in a ZIP.

PDF layouts contain fonts, images, and precisely positioned content. PDFCrowd handles their conversion so your application can display the HTML without installing and maintaining a local PDF-to-HTML converter.

Control the HTML output

Pages and scale

Select pages and adjust the scale of the output.

Resources

Embed images, CSS, and fonts, or return separate files in a ZIP; select the supported extracted-image format.

Presentation

Add custom CSS and adjust documented font-processing options.

Common uses

  • Publish PDF reports or publications as HTML pages on a website.
  • Display converted document pages inside a web application.

From PDF to HTML

Source PDF — page 1 of 2
Converted HTML — page 1 of 2

Other PDFCrowd products and tools

PDF to PDF API

Merge PDFs or extract selected pages while keeping PDF output.

Ready to display your PDF as HTML?

Try the API with one of your documents.