"text/javascript" is not a correct MIME type (the correct one is "application/javascript") but it's not even needed; all browsers default to the correct type and treat it as executable JS when type is ommited. Since not all browsers recognize the "application/javascript" MIME type the only way to both stay compliant and to support all popular browsers is to omit the type. It's also shorter this way.
"Hello World" overview
This example is a minimalistic application of the pdf.js project. The file
helloworld.pdf
is from the GNUpdf project (see [Introduction to PDF at
GNUpdf] (http://gnupdf.org/Introduction_to_PDF)), and contains a simple and
human-readable PDF.
Getting started
Point your browser to index.html
. Voila. Take a peek at hello.js
to see
how to make basic calls to pdf.js
.