pdftohtml
converts PDF files to HTML, XML, or PNG format
TLDR
SYNOPSIS
pdftohtml [options] pdffile [outputfile]
DESCRIPTION
pdftohtml converts PDF files to HTML, XML, or PNG format. Part of the poppler-utils package, it attempts to preserve the visual layout of PDF pages in the resulting HTML output.By default, it generates one HTML file per page plus a frameset index. The -s option creates a single file containing all pages. Images are extracted as separate PNG files unless -i is specified.The XML output mode provides structured data about text positioning and formatting, useful for further processing or text extraction.
PARAMETERS
-i
Ignore images-s
Generate single HTML file for all pages-xml
Output as XML instead of HTML-c
Generate complex output (more accurate layout)-hidden
Force extraction of hidden text-f _n_
First page to convert-l _n_
Last page to convert-zoom _factor_
Zoom factor (default: 1.5)-noframes
Generate no frames (single page output)-enc _encoding_
Output encoding (default: UTF-8)
INSTALL
CAVEATS
Complex PDF layouts may not convert accurately. Scanned PDFs (images) require OCR and won't produce text output. Font embedding and unusual characters may cause display issues. Large PDFs generate many output files without -s option.
HISTORY
pdftohtml originated in the xpdf project and is now maintained as part of poppler-utils, a fork that provides shared library access to PDF rendering functionality on Linux systems.