Pdf.js Reaches First Milestone
theweatherelectric writes "The pdf.js project aims to implement a PDF viewer using standards-compliant Web technologies. The project has reached its first milestone: it renders the sample PDF (a paper on Mozilla's Tracemonkey JavaScript engine) perfectly. However, that perfection currently comes with some caveats: 'pdf.js produces different results on pretty much every element in the browser×OS matrix. We said above that pdf.js renders the Tracemonkey paper "perfectly" if you're running a Firefox nightly. On a Windows 7 machine where Firefox can use Direct2D and DirectWrite. If you ignore what appears to be a bug in DirectWrite's font hinting. The paper is rendered less well on other platforms and in older Firefoxen, and even worse in other browsers. But such is life on the bleeding edge of the web platform.'"
The big downside is that it's all images and you can't do all those fancy things you can do with text. Like select, copy & search.
Goatse
under non-free Licence
looks very open to me... (congrats, 'twas a while ago I was goatsed the last time)
On a Windows 7 machine where Firefox can use Direct2D and DirectWrite.
Editors! WTF?
Even reading the summary it is clear that this is a very, very early development work. This is their *first* milestone, of course it's going to be severely lacking in almost every way. Of course it's not cross-browser and doesn't allow selectable text... but eventually it will be. I, for one, think this is a great idea, and can't wait to see it done!
If you read the article (I know, I know)...
pdf.js has now reached the point where a significant portion of its issues are actually browser-rendering-engine bugs, or missing features. Finding these gaps and filling some of them has been one of the biggest returns on our investment in pdf.js so far.
The problem isn't what they've written so much as the browsers not being able to support the latest and greatest HTML5/JS functionality.
I can understand the use of this to find and fix browser bugs.
But it seems amazingly inferior to a platform native PDF reader, on any platform imaginable. It will be slower the native x86/ARM code by far, and won't integrate well with the desktop environment.
What's with this trend recently to build everything on fundamentally sucky technologies?
I currently have PDFs set to be downloaded and opened in an external application, because PDF rendering in a browser tab (using Adobe's PDF plugin) fucks up important shortcuts: Cmd-W no longer closes the tab but throws up an annoying dialog. That alone would be reason enough to switch.
So, "Firefoxen" is now the plural of Firefox?
Really now?
Oh wow, retro-trolling. Soon we'll be back to page-widening, Steven King is dead and bell bottoms.
They've actually failed to grasp the point of PDF. You might as well go back to HTML if your PDF reader can't render the same everywhere considering that was the whole point of PDF to begin with.
I just love bloating up my javascript libraries with tl;dr licenses.
Goatsex
This reeks of goatse...
Parent is goatse. Dammit, and I've avoided it for a decade.
This is really cool. Now we just need to have web2js instead of web2c, and we can typeset documents with TeX in the browser.
-- Ed Avis ed@membled.com
(congrats, 'twas a while ago I was goatsed the last time)
I hope you mean saw that picture!
https://github.com/andreasgal/pdf.js (It's BSD licensed, minus the credits clause).
Who's the asshole now?
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
I'm the one who finds this "We do all things now in the browser" highly suspect. I already have a perfectly fine Pdf viewer, called Okular. Why not just give me a link to the Pdf file, so that I can download it, use my favorite Pdf-Viewer and print it out if I like?
I would really appreciate their affords, but I just known this is not done for my convenience, but for cooperate interests. The only reason this is developed, so that they can put some Ads inside the Pdf file, prevent me from downloading it or printing it. Like Slideshare, but without Flash.
Maybe the second reason is, so I can view Pdf files in iPad or similar device, such don't have a Pdf viewer. But that is cooperate interests again, because they can much easier prevent me from installing software I like, and force me to use their software.
http://www.mueller-public.de - My site http://www.anr-institute.com/ - Advanced Natural Research Institute
It's you.
pdf is old vector graphics news. If they want to help a parky out they can get TinySVG support built in to Firefox so I can finish rebuilding all of my XUL UI's in SVG. ...that don't work now unless the user knows how to re-enable support then ends up getting owned instead of a warning like getting a self signed cert... Cough. Sorry. Oh while I'm dreaming, getURL, putURL, and parseXML functions so I don't have to "if typeof (parseXML=='undefined')" override them every time would be nice too :) Oh and those wondering about the relationship here, pdf to svg is easier to convert and display on the fly. Well. For me. So programmers can probably do it in their sleep. Oh. Oh. And a pony.
Having to work for a living is the root of all evil.
On the other side of things, it is possible to do vector PDF screenshots of GTK+ apps, including browsers:
https://www.joachim-breitner.de/blog/archives/508-gtk-vector-screenshot-works-with-epiphany.html
I'm guessing you're modded Funny because - sadly - this hasn't been true of PDF in a long time now.
Even between desktop PDF readers there's now too much of a difference to even remotely be able to 'rely' on it. Even bitmaps are getting less and less reliable with applications choosing to either respect or ignore gamma tags, let alone color profile information.
As it is, I used to use FoxIt, but that started to get bloaty and including oddball toolbars. So I switched to PDF-Xchange. I'm about to switch again (Sumatra, maybe?) because PDF-Xchange takes far too long to render pages with lots of graphics. And neither FoxIt nor PDF-Xchange render vector content with anti-aliasing correctly.
http://i.imgur.com/f8udg.png
( original image source: sinfest.net . Note that left image was at 172% zoom, right image was at 150% zoom, to get the same on-screen size. wtf? )
I'm going to guess that Sumatra really won't be any much better and maybe I'll have to go back to FoxIt.
Either way, it looks like Adobe Reader will have to remain installed for when these alternatives don't quite get things right.
I find it quite hilarious that people speak seriously about coding artificial intelligence as if it will happen in the this decade, when at the same time we can't even achieve a consistent rendering of the same elements in different browsers.
I can render a PDF perfectly on all OSes I own (Windows, OS X, iOS, Windows Phone 7) already!
My book: Friendly F#, fun with game development and XNA; my game: Galaxy Wars by VSTeam; my gamedev language: Casanova.
Javascript is NOT STANDARDS COMPLIANT. All you js bozos who keep claiming it is are morons. Until the ecma standard is committed to by ALL browser vendors it never will be! That means you M$ dumb$41ts.
This is just silly. While I can appreciate it from a point of curiosity and it is probably a fun project, this is really overloading the browser.
I would submit that things like this are actively breaking the browser paradigm. Every PDF viewer allows you to save a local copy of the PDF after they have read it from the temp directory or the download directory. To implement this thing correctly is would require that JS have direct access to the file system, which as I understand it, aint fucking supposed to happen, since that would create untold numbers of security problems in a system already plagued by security problems.
While there may be arguments that this would be ok, they would all be moronic.
The entire notion of the browser needs to be forked out to an application shell with hard as nails security and a presentation shell and never the twain shall meet.
Hey KID! Yeah you, get the fuck off my lawn!
A similar project exists for OpenDocument format. It is called WebODF. It handles texts, spreadsheets and presentations. It's not perfect yet though.
That's how it is in theory; in practice it's used as a media-capable .doc format. 99% of the time you don't care about presentation.
Direct2D and DirectWrite? Sorry but browser graphical acceleration must end.
WebGL should be implemented with no hardware acceleration, using graphic card emulation.
> Either way, it looks like Adobe Reader will have to remain installed for when these alternatives don't quite get things right.
You might consider installing a VM like VirtualBox or some kind of sandboxing solution so that you can convert / print / export and subsequently erase any "side effects".
Memory and surplus CPU power is getting cheaper and cheaper, I don't understand why more people don't talk about going this route.
Or perhaps you've failed to grasp the point of a v0.2 pre-release on github? In fact TFA specifically states that pixel perfect rendering _is_ their goal.
The blog post describes the current progress; it now has good rendering on one platform, progress from last week.
Either way, it looks like Adobe Reader will have to remain installed for when these alternatives don't quite get things right.
Then why not just use Adobe Reader if you are going to have it installed?
Back when I still used Windows, Acrobat Reader was an absurdly large app and by far the slowest PDF reader I knew over all platforms. It always struck me as absurd that Apple and Linux users had built-in, capable, lightweight PDF viewers while most Windows users used that bloated POS. Maybe acroread is better these days, but I kind of doubt it.
Switch back to Slashdot's D1 system.
ha thats a ghost argument
"see my infinity energy machine works perfectly fine, its just the laws of physics have not caught up yet"
does not sound like any less bullshit
The Javascript code isn't doing the rendering of text. It uses dynamically loaded fonts and lets the platform's own font renderer render the glyphs. The Javascript code isn't pushing pixels.
There's less need for PDF than there used to be, now that you can download fonts in the browser. It might be worthwhile to take this PDF viewer and turn it into a server-side PDF to HTML translator.
I bet they could do it in a week with XAML...
Did you try gnome's evince? it has a little known windows version, which is easy and very decent.
Being free software makes it free of toolbar, ads and clutter. plus using the same software no matter the OS is nice.
But WHY? Why spend precios cycles that eat battery life and heat up your PC innards doing the same thing through twenty layers of twisted human logic, that a piece of native runtime plugin code can do as well? 'Plugin' is just a word, it doesn't need to be insecure, alien, buggy or . And even if they are that, the problem lies at another level.
If anything, Pdf.js will be suitable where and when energy and resource conservation isn't a factor.
As for me, I prefer to avoid all the extra layers of abstractions and have the ball fall into the same basket.
Please enlighten me, a software developer of many years, what is this gold that is Pdf.js? I mean, apart from proof-of-concept being gold in itself.
Actually Sumatra is pretty nice. it is fast, low resource, haven't done any side by side but so far looking at a ton of PDF that I have they look the same as they did in Foxit so I assume they are rendering correctly.
So if you want to give Sumatra a spin the easiest way is to use Ninite which turns 'clicky clicky next next next" into click and run. They also have tons of nice software from CCleaner to Glary Utilities and all of it TOOLBAR FREE without having to worry about checkboxes hidden on page 5.
as for TFA good luck, with the big complicated security mess that is PDFs? They are gonna need it. Personally I don't think having everyone with the same default PDF engine would be all that smart as it gives a common denominator for the bad guys to target. But then again I still think H.264 sucks compared to flash performance on older machines so what do I know.
ACs don't waste your time replying, your posts are never seen by me.
the problem though is that they will never be able to test it on more platforms than those that have native pdf rendering. So it is unlikely that it will ever be advantageous over those. If we are going this way let's just download compile and run C code from the browser automatically. If anything it may be easier to write cross platform C than cross platform Javascript+HTML!
Umm, how is parent a troll for posting a link to the actual thing the top parent spoke of? He's not.
Whoever wrote that should just go and shoot themselves in the face a couple of times.
To have a right to do a thing is not at all the same as to be right in doing it
Except that you can expect the missing browser functionality to be added, or in the case of open source browsers potentially add it yourself.
Changing the laws of physics is a rather different matter.
It's official. Most of you are morons.
Reader 10 is still a large download but it loads much faster than, say, Reader 8 or 9.
I believe it is mainly because they don't preload plugins anymore.
Search RapidShare and MegaUpload!
Back almost 10 years now, Adobe was playing with and investing heavily in Java technologies. At that time they had a pretty full featured PDF viewer written entirely in Java. They should just open source that project (codename 'Fault line' IIRC) to help these guys complete this task. After all, it is a much smaller leap from Java to JavaScript than what they are trying to do.
the problem though is that they will never be able to test it on more platforms than those that have native pdf rendering.
Wrong. The test suite compares the canvas rendering against reference images (potentially generated on a different device).
As it is, I used to use FoxIt, but that started to get bloaty and including oddball toolbars. So I switched to PDF-Xchange. I'm about to switch again (Sumatra, maybe?) because PDF-Xchange takes far too long to render pages with lots of graphics.
Have you tried STDU Viewer? I switched to it after Foxit started trying to emulate Acrobat, it's small, lightweight, and reasonably good at rendering stuff, although a bit slow on page transitions sometimes. Another thing that impressed me was that I sent in a feature request, got a reply within 24 hours, and it was added in the next update.
And neither FoxIt nor PDF-Xchange render vector content with anti-aliasing correctly
Where can I get a sample PDF with this? I've just tried it with STDU Viewer and it seems to render at least diagonal lines with antialiasing properly, but if there's some test PDF that really shows it up I'd be interested in trying it.
Changing the laws of physics is a rather different matter.
Black holes do it all the time! :p
Remember to maintain your supply of
There's also another open source PDF project called Trapeze. It currently works in firefox, safari and chrome. Demo at: http://trapeze.xyrka.com/ Project at: http://code.google.com/p/trapeze-reader/ I even posted it to slashdot awhile back, but it never made it to the front page... http://slashdot.org/firehose.pl?op=view&id=17924850