How to convert PDF to HTML
- Choose a PDF with real text (up to 300 pages).
- Look at the Preview, or switch to HTML code to copy it.
- Download the .html file and open it in any browser.
How it works
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, bold and italic text become <strong> and <em>, and the PDF's web links become <a> links. Everything else is joined into <p> paragraphs, and pages are separated by a line (<hr>). All text is escaped, so nothing in the PDF can turn into code on the page.
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.