mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.87k stars 9.91k forks source link

Pdf js showing to slow pdf file #3074

Closed imartmukesh closed 11 years ago

imartmukesh commented 11 years ago

Is there any way to reduce size of js which is used in pdf.js .i want to render only pdf file with previous and next button.can anybody help me out.

brendandahl commented 11 years ago

I'm not positive what you're asking, but you can minify the js or if you're looking for a small example viewer https://github.com/mozilla/pdf.js/tree/master/examples/helloworld

imartmukesh commented 11 years ago

Hello,

It also includes so many js which i don't want to be.kindly suggest minimum js which need to be view pdf with paging.

On Sat, Apr 13, 2013 at 4:26 AM, Brendan Dahl notifications@github.comwrote:

I'm not positive what you're asking, but you can minify the js or if you're looking for a small example viewer https://github.com/mozilla/pdf.js/tree/master/examples/helloworld

— Reply to this email directly or view it on GitHubhttps://github.com/mozilla/pdf.js/issues/3074#issuecomment-16321766 .

Buying was never this simple! India’s No. 1 B2B Marketplace IndiaMART.com provides over 12,00,000 suppliers for your sourcing needs. Log on to IndiaMART.com http://www.indiamart.com now!

Follow us for latest updates: http://www.google.com/+IndiaMART http://www.facebook.com/IndiaMART http://www.twitter.com/IndiaMART

benbro commented 11 years ago

Here you can see an example with preview/next buttons http://jsbin.com/pdfjs-prevnext-v2/edit#html,live

You still need to minify it with a tool like closure compiler or YUI compressor

imartmukesh commented 11 years ago

Thanks for giving response when i went to compress pdf.js i got an error in YUI compressor.can you plz rectify me whether i am wrong or wht.

[ERROR] 9186:59:missing ] after element list [ERROR] 9186:59:missing } after function body

[ERROR] 1:0:Compilation produced 2 syntax errors. org.mozilla.javascript.EvaluatorException: Compilation produced 2 syntax errors. at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:154) at org.mozilla.javascript.Parser.parse(Parser.java:392) at org.mozilla.javascript.Parser.parse(Parser.java:337) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.(JavaScriptCompressor.java:533) at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:131) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)

Can you plz help me.

Regds, Mukesh

On Sun, Apr 14, 2013 at 9:38 PM, benbro notifications@github.com wrote:

Here you can see an example with preview/next buttons http://jsbin.com/pdfjs-prevnext-v2/edit#html,live

You still need to minify it with a tool like closure compiler or YUI compressor

— Reply to this email directly or view it on GitHubhttps://github.com/mozilla/pdf.js/issues/3074#issuecomment-16353480 .

Buying was never this simple! India’s No. 1 B2B Marketplace IndiaMART.com provides over 12,00,000 suppliers for your sourcing needs. Log on to IndiaMART.com http://www.indiamart.com now!

Follow us for latest updates: http://www.google.com/+IndiaMART http://www.facebook.com/IndiaMART http://www.twitter.com/IndiaMART

benbro commented 11 years ago

It's a known issue in YUI compressor https://github.com/mozilla/pdf.js/issues/2479

You can try closure compiler with something like: java -jar compiler.jar --js=pdf.js --language_in=ECMASCRIPT5 --js_output_file=pdf.min.js