For sites using the private file system pdf.js appears to be the only way to render/view pdf files within the site. What are the chances PDF Reader will support pdf.js – currently marked TODO – when it makes it to a full version release? If it did, it would be the first Drupal module to do so, at least as far as I can tell.

CommentFileSizeAuthor
#4 pdf_reader_rc3_pdf_js.patch527 bytesint_ua

Comments

victorcoder’s picture

Assigned: Unassigned » victorcoder
Status: Active » Needs review

Hey Grabby this is implemented in RC3 now. Test it and tell me how it goes for you. Keep in mind it's a very alpha implementation.

Wait for the next few hours to be available for download.

Thanks for your support.

grabby’s picture

Version: 7.x-1.0-rc2 » 7.x-1.0-rc3
Assigned: victorcoder » Unassigned
Status: Needs review » Active

Victor, it’s not really working for me. The viewer loads, but it can’t find the file. I’m normally using only private files, but I tried it with a public file and that doesn’t work either. Also, in connection with http://drupal.org/node/1515842, there really should be much more documentation to accompany this module. At least the PDF module’s documentation tells you how to build pdf.js – that should be a part of the documentation here. Even better would be a simple download to facilitate testing and deciding if this module even meets one’s needs. Colorbox support also should be described. For example, what exactly should be entered in the box “Colorbox link”? That said, cheers for taking this on. I’ll help with what little I can given that I’m not a programmer.

cogno’s picture

Just following up on this; I've given it a shot and am getting the following error:

Failed to load script: //sites/all/modules/pdf_reader/js/pdf.js (nsresult = 0x805303f4)

Interesting, because that file is in the right place.

int_ua’s picture

StatusFileSize
new527 bytes

cogno, this patch should fix the issue you're having.

int_ua’s picture

Well, it works with the patch. For anyone expecting something like http://mozilla.github.com/pdf.js/web/viewer.html : it's much simpler as of now.

MrsWho’s picture

Thanks for the help, that patch worked for me. However, the width & height fields appear to have no affect on the file's display. Any suggestions for making it smaller (besides resizing the whole file?) On a related note, if I click the colorbox option with pds.js the width and height affect the colorbox size, but the file doesn't appear.

leszek.stachowski’s picture

Patch from cogno works well, thanks! For anyone having issues with pdf.js not displaying control (zoom etc) images using IIS Express here is the solution: http://www.tomasmcguinness.com/2011/07/06/adding-support-for-svg-to-iis-... and read the comments from http://www.tomasmcguinness.com/2011/07/06/adding-support-for-svg-to-iis-...

victorcoder’s picture

Status: Active » Needs review

Sorry been father lately and with much less time.

I updated the module with the latest pdf.js version and the new viewer style, also applied patch from cogno (thanks).

Thanks for reporting bugs and support.

warmth’s picture

1. Why is the tool bar of pdf.js being contracted and why is not embeded at all but appearing like a long list of content? Both things looks better on http://drupal.org/project/pdf but I see a more robust system working on PDF Reader, so I wanna use it anyway.

2. Why are you not using http://drupal.org/project/libraries like http://drupal.org/project/pdf does to make it easier to update the pdf.js version?

3. pdf.js is the only viewer not working on Colorbox

4. When Colorbox option is enabled the Download link won't appear (Without Colorbox even http://drupal.org/project/pubdlcnt/ seems to work great)

victorcoder’s picture

1. Have to do some checkings to CSS

2. PDFReader doen't use libraries project due to some pdf.js tweeks that need to be done in pdf.js viewer JS/CSS files, it require some work but definetly the way to go in the next release.

3. Right pdf.js support is experimental so some features are not implemented with it.

4. Thanks for reporting.

Thanks for the support!

warmth’s picture

No problem my friend, I'm here to help! Can't wait to see what's next!

lsolesen’s picture

Issue summary: View changes
Status: Needs review » Fixed

Closing old issues. This seems to be implemented. If something does not work for your, please open new issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.