3 ms·
> you have to do something like what docx and odf do: XML definition+resources in zip container ... which now look a lot like PDF. Only superficially. .docx a
by mwcampbell 7y ago
> you have to do something like what docx and odf do: XML definition+resources in zip container ... which now look a lot like PDF.
Only superficially. .docx and .odt are single files as PDF is, but the contents of those files are very different. A PDF document is designed around the assumption of printed pages with a fixed layout. Yes, tagged PDF has been retrofitted onto the base PDF format for accessibility, but most PDFs that I've seen in the wild do not use this extra feature.
To understand why starting with a PDF and converting to HTML is a bad idea, try any PDF-to-HTML converter you can find; there's the pdftohtml utility included with Xpdf and Poppler, but any of the commercial alternatives are not a lot better. Once you learn more about how PDF works, you'll understand why PDF to HTML conversion can't be very good.