Live data from Hacker News

Pdf.js: PDF Reader in JavaScript

mozilla.github.com

61–70 of 94 posts

Re: Pdf.js: PDF Reader in JavaScript

#62
post #22
post #18

Earlier quoted context omitted.

No, Chrome has its own binary plugin. IIRC it is closed source and not available in Chromium. Pdf.js is developed by Mozilla and now shipped with Firefox and it works quite well so far.

That's correct. I use Chromium on Arch Linux and it doesn't come with the proprietary pdf reader by default.

You said "by default" which is correct but just for the sake of completeness, the built in Chrome PDF reader can easily be added to Chromium on Arch using this package from the AUR: https://aur.archlinux.org/packages.php?ID=44148

I've been using it for almost a year now without issue.

Re: Pdf.js: PDF Reader in JavaScript

#64
Two questions:

1) In Firefox 15, the demo page adds two new options to my right click menu: Rotate clockwise and Rotate Counter-clockwise. Is Firefox recognizing pdf.js (since it appears that they are related) or pdf.js adding menu options? I didn't know JS could do that.

2) Isn't Javascript an embeddable language inside PDFs? I'm pretty sure I read that javascript is used, not necessarily for animations but for run-time dynamic layouts. If that's true, is pdf.js "eval"-ing that javascript?

Re: Pdf.js: PDF Reader in JavaScript

#65

Two questions: 1) In Firefox 15, the demo page adds two new options to my right click menu: Rotate clockwise and Rotate Counter-clockwise. Is Firefox recognizing pdf.js (since it appears that they are related) or pdf.js adding menu options? I didn't know JS could do that. 2) Isn't Javascript an embeddable language inside PDFs? I'm pretty sure I read that javascript is used, not necessarily for animations but for run-…

HTML5 context menu API: http://www.whatwg.org/specs/web-apps/current-work/multipage/...

Re: Pdf.js: PDF Reader in JavaScript

#67
post #65

Two questions: 1) In Firefox 15, the demo page adds two new options to my right click menu: Rotate clockwise and Rotate Counter-clockwise. Is Firefox recognizing pdf.js (since it appears that they are related) or pdf.js adding menu options? I didn't know JS could do that. 2) Isn't Javascript an embeddable language inside PDFs? I'm pretty sure I read that javascript is used, not necessarily for animations but for run-…

HTML5 context menu API: http://www.whatwg.org/specs/web-apps/current-work/multipage/...

Thanks.

I've seen custom contextmenus generated on pages[0] that override the built-in context menu but for some reason I've yet to come across a page[1] that adds to the existing context menu until today.

[0] replacing example: http://developer.yahoo.com/yui/examples/menu/tablecontextmen...

[1] appending example: https://bug617528.bugzilla.mozilla.org/attachment.cgi?id=554...

Re: Pdf.js: PDF Reader in JavaScript

#68
post #23

Earlier quoted context omitted.

I think Firefox has been shipping with this for awhile to view PDFs. It may be an about:config value you have to turn on though.

I only noticed it in FF15, but it may have been there for longer. Change pdfjs.disabled to false in about:config (followed by a browser restart) if you want to turn it on. Here's a test file[0] should you wish to test it out. I've been using pdf.js for a while on my Windows box (where it is enabled by default on the FF beta channel) and it has performed remarkably well. Sometimes it's a bit slower than Adobe Reader o…

Sweet! (It voids the non-existent FF warranty though...)

What's better is, it allows the (awesome) extension Pentadactyl to click the buttons in the viewer (since it's part of the browser). Have to click on (or tab to?) to the document itself though, in order to be able to use keyboard navigation on it though :-/

Re: Pdf.js: PDF Reader in JavaScript

#70
post #65

Earlier quoted context omitted.

HTML5 context menu API: http://www.whatwg.org/specs/web-apps/current-work/multipage/...

Thanks. I've seen custom contextmenus generated on pages[0] that override the built-in context menu but for some reason I've yet to come across a page[1] that adds to the existing context menu until today. [0] replacing example: http://developer.yahoo.com/yui/examples/menu/tablecontextmen... [1] appending example: https://bug617528.bugzilla.mozilla.org/attachment.cgi?id=554...

>but for some reason I've yet to come across a page that adds to the existing context menu until today.

the reason is likely because browser compatibility for the context menu js api is pretty minimal [1]. firefox can use it on pages that are only going to be displayed in firefox, but for the internet at large it's pretty useless.

[1]http://caniuse.com/menu

Post reply on HN