Export Documentation to PDF with HTML2PDFAPI

Convert your documentation sites, API references, and help articles to professional PDFs. Give users offline access and printable versions.

Why Export Documentation to PDF?

Offline Access

Let users download docs for offline reading and reference.

Enterprise Requests

Enterprise clients often need PDF documentation for compliance.

Printable Format

Professional printed documentation for training and workshops.

Version Snapshots

Archive documentation versions as PDFs for historical reference.

Code Example: Export Documentation

// Node.js - Export Documentation to PDF
const response = await fetch('https://html2pdfapi.com/render', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    url: 'https://docs.yourapp.com/api-reference',
    format: 'pdf',
    options: {
      format: 'A4',
      printBackground: true,
      displayHeaderFooter: true,
      headerTemplate: '<div style="font-size:10px;text-align:center;width:100%;">API Documentation</div>',
      footerTemplate: '<div style="font-size:10px;text-align:center;width:100%;"><span class="pageNumber"></span>/<span class="totalPages"></span></div>'
    }
  })
});

Documentation Export Features

  • Headers and footers
  • Page numbers
  • Code syntax highlighting
  • Table of contents links
  • Multi-page support
  • Custom page breaks
  • URL to PDF conversion
  • Authenticated page access

Works With Popular Doc Platforms

GitBook

Docusaurus

ReadMe

Notion

Explore More Use Cases

Start Integrating

Node.js Python PHP Ruby Go

Give users offline access to your docs

Headers, footers, and page numbers included. Test it free.

Get API Key