[dba-Tech] Great JS PDF Viewer...

Jim Lawrence accessd at shaw.ca
Wed Sep 2 19:56:23 CDT 2015


Hi Shamil:

I went one step back up the directory tree to:

https://github.com/mozilla/pdf.js/tree/master/web

...and downloaded the ZIP file, expanded it. 

The directory of interest is "web" and the start html file within that directory is "viewer.html". Note: The PDF file is in that root directory and is called "compressed.tracemonkey-pldi-09.pdf" The file name is assigned to the global variable "URL", in the JavaScript file named "viewer.js" (loaded and called from the "viewer.html" file), on line 30 but it can be assigned anywhere within the html application or via a config file. See the JavaScript function file, "download_manager.js" which assembles the PDF url, for the actual downloading code.  

Aside: The code is really nice and should be used as reference material. :-)

Jim  

----- Original Message -----
From: "Salakhetdinov Shamil" <mcp2004 at mail.ru>
To: "Discussion of Hardware and Software issues" <dba-tech at databaseadvisors.com>
Sent: Tuesday, September 1, 2015 5:29:56 AM
Subject: [dba-Tech] Great JS PDF Viewer...

 Hi All --

Here is a greate JS PDF Viewer

http://mozilla.github.io/pdf.js/web/viewer.html


but I cannot find how they define the url/path to the .pdf file to be loaded/viwed, do you? - the sources are here:

https://github.com/mozilla/pdf.js/tree/master/web

BTW, if you try the above link ( http://mozilla.github.io/pdf.js/web/viewer.html ) on your smartphone it should also work, I suppose, as it worked on my old Nokia Lumia 800.

Enjoy!


Thank you.

-- 
Салахетдинов Шамиль
_______________________________________________
dba-Tech mailing list
dba-Tech at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-tech
Website: http://www.databaseadvisors.com



More information about the dba-Tech mailing list