Updates
parent
c4467c5bc7
commit
1e402cd44a
@ -20,13 +20,9 @@ You can test your own documents by placing them into the <tt>test</tt> 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 <tt>file</tt> 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 <pdfjs-dir>
|
||||
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 <tt>viewer.html</tt> and <tt>viewer.js</tt> 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/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user