Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we convert PDF files to HTML using C,C++,or Java (any language)?

Tags:

java

c++

html

pdf

I need to convert PDF files into HTML files (IOS platform) so that I can annotate the HTML page using Javascript. I had some success in annotating HTML pages, so if I can convert PDF to HTML I can complete my task. How can I do the conversion?

like image 854
Naveen Thunga Avatar asked Sep 14 '26 22:09

Naveen Thunga


2 Answers

Converting FROM PDF is generally Very Hard (at best).

PDF contains drawing instructions. "Line from here to there", "these characters at these coordinates". There's usually no information about the logical meaning of these lines, characters, and images, though "Document Structure" is becoming more common.

Without "document structure" and "marked content" it is Very Hard to go from "a pile of lines and characters" to "a table with this information in these columns and rows".

Not impossible, just Very Hard.

And people who have worked on this problem aren't all that interested in sharing their code for free.

like image 194
Mark Storer Avatar answered Sep 16 '26 10:09

Mark Storer


It will be hard to convert any pdf, some of them are too complicated for HTML.

Take a look at libpoppler it has already pdf2html functions and it is open source, you can always extends it, so it fits yours requirements.

like image 26
p4553d Avatar answered Sep 16 '26 11:09

p4553d



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!