coolwanglu/pdf2htmlEX

pdf2htmlEX - output html source code

MBhat6 opened this issue · 9 comments

I have a issue with pdf2htmlEx output. I created a html output for my pdf document, and it renders nicely. But in the source code I see that the words are broken and are separated with $, ! and spaces and and spans. In fact at times there are lots of ! And $ signs.

In my program I generate the html file and I search for keywords in the text and put tags to highlight them. But because of the broken words, this output doesn’t let me search my keywords. The browser search works great however.

Any suggestions or work around is appreciated

I face the same issue. Not sure why there are so many $ and ! signs, and some words have space addeded in the middle. The text seems to be in one line too.
Is there a way to create cleaner files, or convert this file to a cleaner html?

I have the same issue here. I need to replace a bunch of words in the HTML file, but because of these <span>-tags everywhere, I can't search and replace.

I wonder if it's possible to stop that from happening in the source. So it won't break up words.

@ebbandari Non-commercial? As far as I know, GPLv3 licensed software can be used for commercial use as much as you want.

@ebbandari Exactly. I can use it for whatever I want, but if I go out and make a "PDF to HTML converter" and use pdf2htmlEX as my tool, my business is built solely from the code of pdf2htmlEX (if pdf2htmlEX did not exist, neither would my product).

As long as we use them as tools, we can use them as much as we want.

@MBhat6
Yes there is a solution.
I had the same issue. I had to highlight the keywords in the HTML document which was rendered correctly but the words were broken by span.

I made use of BeautifulSoup, a python package, to parse the html and mark(highlight) the keywords.