How to convert PDF to HTML
- Choose a PDF with real text (up to 300 pages; 100 in the original-layout style). If it has a password, enter it when asked.
- Pick the style: Clean HTML to edit or publish the text, Original layout to keep the layout and pictures.
- Check the preview (or the HTML code), then download the .html file and open it in any browser.
How it works
Clean HTML: text sizes decide the structure. The size most of the text uses is body text, and lines 1.6, 1.3 and 1.15 times larger become <h1>, <h2> and <h3> headings. Bulleted and numbered lines become <ul> and <ol> lists, text set apart in columns becomes a <table>, bold and italic text become <strong> and <em>, and the PDF's web links become <a> links. Everything else is joined into <p> paragraphs; page numbers and running headers are left out unless you keep them, and pages are separated by a line (<hr>). All text is escaped, so nothing in the PDF can turn into code on the page.
Original layout: each page is drawn as a JPEG picture at 108 DPI, and every piece of text is placed over it, invisible, at its position on the page. The positions are percentages of the page, so pages shrink to fit a phone and the text stays where it belongs.
Example
The same page used for PDF to Markdown, with a 24 pt title, a 15 pt subheading, a paragraph, two lists and a link, becomes:
<h1>Project Handbook</h1>
<h2>Getting started</h2>
<p>Install the app from the store and sign in. Your data stays on your phone.</p>
<ul>
<li>Open Settings</li>
<li>Choose a theme</li>
</ul>
<ol>
<li>Back up weekly</li>
<li>Keep two copies</li>
</ol>
<p>Read <a href="https://palz.co.in/guide">the guide</a> for details.</p>For notes and AI tools, PDF to Markdown gives the same structure as plain text. To go the other way, Markdown to HTML turns Markdown into a web page.