user2422940
user2422940

Reputation: 977

how to get pdfJS to render a pdf from URL?

i am using PDFJS to render PDFs files using their URL after scanning the current page a js snipet return the urls. then it passes them to pdfJS. until now everything works the problem show when the PDF is already open in the browser . i take the URL (*.pdf) and pass it the same way as before the difference is that the file is not downloaded and i have this response.

Warning: Unhandled rejection: Unexpected server response (0) while retrieving PDF "http://geekographie.maieul.net/IMG/pdf/progit.fr.pdf".

(just for the record i dont have CORS issues).

Upvotes: 1

Views: 7703

Answers (1)

NuuoeiZ
NuuoeiZ

Reputation: 94

Try this "http://mozilla.github.io/pdf.js/"

Installation

  1. download and unzip file.
  2. put "PDF" file in this folder.
  3. config in "viwer.js", edit var DEFAULT_URL.
  4. upload folder to server.
  5. Have fun!

Upvotes: 0

Related Questions