1

I installed pdf.js with the PDF module in an effort to show pdf on the fly on my Drupal 7 site. I keep Drupal 7 constantly upgraded on Ubuntu on an instance an AWS.

I installed the module using drush which placed the module at sites/all/modules/pdf. I then copied pdf.js to: sites/all/libraries.

After installing I have created a new content type called PDF and I added a file field that is able to only include a pdf file.

I selected the display to show: "PDF: Default viewer of PDF.js". I then added a content with a PDF file in it selected and uploaded.

While trying to show it I get the message: The pdf.js library could not be found. And down the page: pdf: Please download and install pdf.js!

Can anyone help? Where do I put the JS file? Is there a problem with the FDF module?

4
  • 2
    How you installed it? Where this message came from? What modules are supposed to use it?.. You know what you mean and what you did. We don't; we only know what you actually wrote.
    – Mołot
    Commented Sep 17, 2014 at 9:15
  • Sorry' you are absolutely right' here is everything: I installed Drupal 7 (the latest and constantly upgraded on Ubuntu on an instance an AWS. In an attempt to show PDF file to people that have no PDF client installed I have installed the PDF module From: drupal.org/project/pdf I installed the module using drush which placed the module at sites/all/modules/pdf I thene copied pdf.js to: " sites/all/libraries " After installing I have created a new content type called PDF and I added a file field that is able to only include a pdf file (I will continue an another comment down)
    – ShimonD
    Commented Sep 17, 2014 at 11:30
  • I selected the display to show: "PDF: Default viewer of PDF.js" I then added a content with a PDF file in it selected and uploaded and while trying to show it I get the message: The pdf.js library could not be found. And down the page: pdf: Please download and install pdf.js! Can anyone help with this? Thanks Shimon Dekel
    – ShimonD
    Commented Sep 17, 2014 at 11:30
  • Please use edit link.
    – Mołot
    Commented Sep 17, 2014 at 13:29

1 Answer 1

1

The path will be like this /sites/all/libraries/pdf.js.

pdf.js is a FOLDER not a FILE. It is very strange to have a folder with a DOT in the name.

I have attached a screenshot on the folder hierarchy that works.

SUMMARY:

The folder in your libraries folder must be named: pdf.js, you will have to rename the top folder of anything you download to pdf.js (in this instance pdf.js is not a FILE, but the container of the library) See screenshot for the correct file hierarchy.

PDF.js libraries folder structure

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.