From 1e402cd44aaf6c94783466df8bcf7ebdcf7a02a8 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Thu, 25 Jul 2013 10:06:28 -0700 Subject: [PATCH] Updates --- Setup-PDF.js-in-a-website-(Windows).mediawiki | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/Setup-PDF.js-in-a-website-(Windows).mediawiki b/Setup-PDF.js-in-a-website-(Windows).mediawiki index 82542d0..1b21f57 100644 --- a/Setup-PDF.js-in-a-website-(Windows).mediawiki +++ b/Setup-PDF.js-in-a-website-(Windows).mediawiki @@ -20,13 +20,9 @@ You can test your own documents by placing them into the test directory http://localhost:8888/test/your-test-file.pdf - -DRAFT FROM HERE - - === Opening PDF files from your website === -You need to use the {{attr|file}} parameter in the URL whose value is a full [https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURI encoded URI]. For example: +You need to use the file parameter in the URL whose value is a full [https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURI encoded URI]. For example: http://mozilla.github.com/pdf.js/web/viewer.html?file=http%3A%2F%2Fasync5.org%2Fmoz%2Fpdfjs.pdf @@ -54,15 +50,6 @@ and you should get the following output (or something similar): You can minify PDF.js by approximately 30% with [http://yui.github.com/yuicompressor yui-compressor] or other [http://stackoverflow.com/questions/28932/best-javascript-compressor minification tools]. -==== yui-compressor Ubuntu ==== - -There is a package for yui-compressor on Ubuntu 12.10 or Linux Mint 14: - - sudo apt-get install yui-compressor - cd - mkdir ./production/ - # yui-compressor ./build/pdf.js -o ./production/pdf-min.js # BEWARE OF UNSUPPORTED BEHAVIOR - ==== Use the minified file ==== '''Minification might break the libs''' using yui-compressor. Use at your own risk. @@ -77,7 +64,7 @@ Be sure to edit viewer.html and viewer.js to use the correct f == From build to production == -Now that your build is done, you can copy the viewer and its resources (core files) to your production directory and upload the contents of that directory to your web server: +Now that your build is done, you can copy the viewer and its resources (core files) to your production directory and upload the contents of that directory to your web server (use Git Bash again): # make a production directory if you haven't done so already mkdir ./production/