107 points · by lispython · 14y ago · 61 comments
Please comment at github such that I can see it in time.
When viewing the output (using the "computer science cheat sheet") I found some differences between browsers that I thought HN readers might find interesting. These aren't primarily issues with your tool, hence posting here.
- I primarily use Chrome (21) as my browser, and the cheat sheet renders very quickly. I noticed it doesn't seem to render some equations correctly (see bad operators here[1]).
- FF (15.0.1) seems to render more correctly, but it is glacially slow. The whole app (chrome and all) freezes for several seconds between clicks while the document is loaded in any tab.
- IE (9) renders the same page both correctly and quickly.
For Chrome, if you zoom in, I think everything should be fine.But Chrome is lack of antialias in Windows.
I'm trying to solve the problem of Firefox.
I urge you to find a way to allow people to install your software more easily.
I managed to get it to install (after about an hour and a half of tinkering. However I get "Segmentation fault" when I try running it:
pdf2htmlEX --debug=1 test.pdf
temporary dir: /tmp/pdf2htmlEX-LY9cOv
Preprocessing: ....
Working: Add new temporary file: /tmp/pdf2htmlEX-LY9cOv/__css
Add new temporary file: /tmp/pdf2htmlEX-LY9cOv/__pages
Add new temporary file: /tmp/pdf2htmlEX-LY9cOv/p1.png
Install font: (29 0) -> f1
Add new temporary file: /tmp/pdf2htmlEX-LY9cOv/f1.pfa
Segmentation fault: 11
cmake, fontforge and libpoppler with homebrew,
gcc-4.7 using
sudo apt-add-repository ppa:coolwanglu/pdf2htmlex
sudo apt-get update
sudo apt-get install pdf2htmlex
I haven't yet tried to build on mac os, but in ubuntu it was trivially simple.Would you mind send me the pdf file, for me to debug?
Does it always crash, with other pdf files?
Executable based on sources from 14:57 GMT 31-Jul-2012-D. Library based on sources from 14:57 GMT 31-Jul-2012.
Did you ask them how they do their HTML5 conversion or what exactly do you mean by that?
Anyway, a big Thanks for creating this project!
Depending on the structure of the pdf, one or the either may give better output (the -layout output would need some more processing).
What are some of the constraints on the PDF in terms of page dimensions or configuration?
How is the math translation done? Does it use MathML or something else?
For me, the interest is that I can now go LaTeX ---> Webpage.
There I cut and pasted a quote from the document linked into this response. What do you see? I see a bunch of boxes.
It's the problem of font encoding, which is one of the difference between PDF and HTML. Sometimes you cannot copy the text out of PDF, but you can read correctly.
I'm working on that problem. I made things like this so far because I think visual accuracy is more important.
Great work anyway - I'll have a deeper look.
What is browser compatibility like? Is IE8 supported?
Edit: removed reference to HTML5/canvas, didn't see any in the source HTML.
I just want to run a quick test, but it seems I have to build the project - is that correct?
Needless to say I had to do something pretty similar recently, though I ended up having to ask the customer to provide better source data than the PDFs they initially sent. This tool could have been very useful at the time, hope to give it a spin soon.