Live data from Hacker News

Pdf2htmlEX – Convert PDF to HTML without losing text or format

github.com

31–40 of 51 posts

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#31

Can anyone recommend an equally good opposite (HTML to PDF)? wkhtmltopdf [0] is probably the most popular, but it's also ridiculously buggy. 0: https://code.google.com/p/wkhtmltopdf/

I've had good results with htmldoc (http://www.msweet.org/projects.php?Z1).

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#32
Interesting. So it converts all vector graphics to a background image per page, but keeps all text as browser-rendered on top of it.

I guess I don't really see much practical purpose for it -- most browsers these days seem perfectly fine opening PDF files natively, after all. But it's a very cool technological demonstration.

Maybe this could be some kind of bridge tool for generating sites with fancy typographical layout? You could use Adobe Illustrator etc. to do fancy column work, drop caps, hyphenation, all that jazz -- and then "render" into HTML. It would certainly be as anti-"responsive" as you can get, but it would certainly have the ability to generate more advanced typography much faster than you can produce with HTML/CSS by hand.

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#33

Can anyone recommend an equally good opposite (HTML to PDF)? wkhtmltopdf [0] is probably the most popular, but it's also ridiculously buggy. 0: https://code.google.com/p/wkhtmltopdf/

Flying Saucer worked great for me: http://code.google.com/p/flying-saucer/

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#34

Interesting. So it converts all vector graphics to a background image per page, but keeps all text as browser-rendered on top of it. I guess I don't really see much practical purpose for it -- most browsers these days seem perfectly fine opening PDF files natively, after all. But it's a very cool technological demonstration. Maybe this could be some kind of bridge tool for generating sites with fancy typographical la…

As a practical purpose, how about being able to edit a PDF document? I understand that it can be done through some other tools, but this is one more - and would be free and easy.

Convert to HTML -> Edit -> Print back to PDF (if needed)

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#35

Interesting. So it converts all vector graphics to a background image per page, but keeps all text as browser-rendered on top of it. I guess I don't really see much practical purpose for it -- most browsers these days seem perfectly fine opening PDF files natively, after all. But it's a very cool technological demonstration. Maybe this could be some kind of bridge tool for generating sites with fancy typographical la…

As a practical purpose, how about being able to edit a PDF document? I understand that it can be done through some other tools, but this is one more - and would be free and easy. Convert to HTML -> Edit -> Print back to PDF (if needed)

I'm not sure the html will be clean enough to edit, sadly...

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#36

This works and displays correctly, but is unbearably slow on iPad 2 whereas the PDF loads instantly. What is the point then or does it work a lot better in desktop browsers?

I heard that with careful optimization on the server side and a clever JS may solve this. So far the default UI just demostrates the ability of reading-while-downloading. The idea is that now the document becomes more controllable and accessible, say you can put Google Analytics in your resume written in LaTeX; or maybe an social reading service, where you can comment, annotate and share. Unlike PDF viewers, web brow…

Off topic, but is your username missing a "ke"?

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#37
post #28

I've actually been using this to convert large PDF files to HTML to be displayed in-browser. It's for my work, so I don't feel comfortable posting a link to the demo instance here. It is definitely the best solution I've found so far. The outputted HTML / CSS / images look almost identical to the source PDF. That being said, there are a few issues still: * One Gigantic (600kb) CSS file from a single PDF * Hundreds of…

Hey thanks for the info!

2nd & 3rd are in the future plan, as I'm still working on accuracy and speed. And #115(https://github.com/coolwanglu/pdf2htmlEX/issues/115) is about the 2nd issue.

About the first one, I've not got an elegant solution yet, maybe a CSS file per page?

Please file new issues at GitHub if you think it's necessary :)

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#38

Interesting. So it converts all vector graphics to a background image per page, but keeps all text as browser-rendered on top of it. I guess I don't really see much practical purpose for it -- most browsers these days seem perfectly fine opening PDF files natively, after all. But it's a very cool technological demonstration. Maybe this could be some kind of bridge tool for generating sites with fancy typographical la…

It's for embedding, when you want to control the document or access the content.

Say you have a resume written in LaTeX and you want to insert Google Analytics inside?

Re: Pdf2htmlEX – Convert PDF to HTML without losing text or format

#40

Can anyone recommend an equally good opposite (HTML to PDF)? wkhtmltopdf [0] is probably the most popular, but it's also ridiculously buggy. 0: https://code.google.com/p/wkhtmltopdf/

Print the HTML document to a postscript printer, but have it print to file.

Then use ps2pdf from ghostscript.

You can automate this with a small amount of work.

Post reply on HN