Crocodoc looks great! Just out of curiosity: do you have a set of fonts ready to deliver to the client in order to make the font-face approach work? What do you do if the PDF if using some obscure font type? Are you using Poppler for server side processing?
No, i don't think i'll edit it (nor do i wish to), but i will apologize for offense i have caused, as that was not my intent.
Edit: I just want to be clear, you see things like "goddamnit" and other ppl using the words "christ" or "god" (in what others may see as taking them in vain) all over the place including on HN. I don't see what the big deal is there either. So really, i do mean it when i say i intended no offense.
The distinction I would make between your comment and "goddamnit" is that while I don't particularly like either one, "goddamnit" doesn't actively mock God/people's religious beliefs about God. On the other hand "Christ on a stick" certainly seems like going out of one's way to mock the crucifixion/people with religious attachment to the crucifixion.
It's probably still an asshole thing to do, but let's at least understand that if he offends you, it's because of something you've chosen to identify with.
Offending people for who they were born -- e.g. ethnicity, gender, sexual orientation -- is wrong and should be marginalized. Saying something that belittles or contradicts the particular explanation you use for understanding how the world works is a) probably unavoidable, and b) elective.
Moreover, "Christ on a stick" only makes sense because Christians have made a concerted effort over the centuries to ensure that when on thinks of American culture, Christian themes will be conjured. Thus, abusing those references while uttering profanities is expected and completely sensible, as long as one is being profane -- it's what comes immediately to mind.
git cloned test.html did not work with latest versions of Firefox, Chrome, Safari for me, yet yours does. I find it strange that there's some policy more restrictive on local content than on remote one, provided yours work perfectly.
To simply start an arbitrary HTTP server to serve up files in a directory I use python's SimpleHTTPServer. This works on most Linux and Mac boxes as they package python along with the distribution or the OS.
python -m SimpleHTTPServer
This serves the files off the current folder under port 8000.
Same with Fx4 on OS X. Chrome 12 skips ligatures entirely (so difficult reads difcult), while Safari 5 just renders a big boxed nothing in lieu of the document.
There seem to be some trouble with curly braces around the emails in the header.
I've been having very good results with the Inkscape SVG renderer (inkscape -z input.pdf -l output.svg). Not pixel-perfect, but handles images and vector diagrams pretty well, and text is selectable/searchable.
This would be a server-side solution, not client-side.
It is a "reader" from the context of the user -- it is software the user uses to read a PDF. In this context a "writer" would be software you use to author a new PDF file. I think it is safe to say this is the more widely accepted terminology on this sort of thing considering Adobe's own PDF viewer is of course called "Adobe Reader".
3000 lines of spaghetti code is one thing. But this code is pretty-well modularized. The author obviously knows what he's doing.
Maybe he finds it easier to jump around the file that way. I know I've built up projects like that. When it starts to transition from tech demo to real product, I would probably break it up into different files (util.js, lexer.js, etc). But no harm in the meantime.
A simple web app spread across 42 files might actually be terrible and over-engineered. Or it might not. The moral is: don't judge code quality by isolated metrics.
He's getting stuff done. That's what great programmers do. Also, a PDF viewer isn't simple. If he can write a PDF viewer -- that works with a variety of PDF files -- in a short space of time, I wouldn't really mind how he organizes the code. It's the research behind the code that takes the time here.
what's wrong with a 3000 line js file? if the code is organized well, a good editor with an outline view makes jumping around 3000 lines no problem. actually I would prefer it over multiple files if I feel the code I wrote belongs to that "module".
Really? Downvoted this much for simply implying that I don't appreciate 3000 line files? I didn't imply that it was bad or wrong, just that I wouldn't prefer to work with that type of style. And I hardly think that a couple of hyper counter examples takes away from my own opinion in coding style.