bmdhaker / share-extras

Automatically exported from code.google.com/p/share-extras
0 stars 0 forks source link

Media Viewers 2.5 - PdfJS cannot load pdf while client-debug in share is set to false #133

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Install media viewwers 2.5 (Alfresco 4.1.1.3 EE)
2. Set <client-debug>false</client-debug> in the share-config-custom.xml
3. Navigate to any document which should trigger the pdf-js viewer

What is the expected output? What do you see instead?
Expected output is that the document is properly previewed.

Actual output is an error message saying "Could not load PDF content".

Everything works fine when running with <client-debug>true</client-debug>.

What version of the add-on are you using? Please provide version of the
downloaded package, or Subversion revision number.
Media Viewers 2.5

What version of Alfresco are you using? On what application server?
Alfresco 4.1.1.3 EE on Tomcat.

What web browser are you using? Please supply browser name and version.
FF 18.0.1, Chromium 24.0.1312.56

Please provide any additional information below.

Original issue reported on code.google.com by marsv...@gmail.com on 12 Feb 2013 at 10:05

GoogleCodeExporter commented 8 years ago
Seems the error is in the minified version of 
extras/components/preview/pdfjs/pdf.js

Replacing the minifed file with an unminified file made the problem go away, so 
thats my workaround for now...

Original comment by marsv...@gmail.com on 12 Feb 2013 at 4:30

GoogleCodeExporter commented 8 years ago
Reproduced locally here. I suspect a problem with the project build script. 
Investigating.

Original comment by will.abson on 15 Feb 2013 at 3:19

GoogleCodeExporter commented 8 years ago
I'm running this version with no problem, but I built the project myself.
Check that it is built with
ant -f project.xml dist-jar
else the yuicompressor is used for minimize, and yuicompressor is not 
compatible with pdf.js. Using project.xml an alternative compressor is used for 
pdf.js.

Original comment by loftux.p...@gmail.com on 15 Feb 2013 at 3:57

GoogleCodeExporter commented 8 years ago
I have double-checked my build config here and re-built a new version, which 
works. The bad minified code also led to a null value being saved for the 
document zoom level on page unload, which required a fix to correct the 
client-side errors triggered as a result.

Version 2.5.1 should fix this issue and the fall-out issue, and is now in the 
downloads section. I have deprecated the 2.5.0 JAR file.

Note, build.xml and project.xml have been refactored and the latter is now a 
lot cleaner.

Original comment by will.abson on 15 Feb 2013 at 5:36

GoogleCodeExporter commented 8 years ago
This 'Could not load PDF content' issue still shows up on my 4.2c install with 
2.5.1 when using FireFox 18. In the latest Chrome, the PDFs are shown properly.

Original comment by erwin.bo...@gmail.com on 16 Feb 2013 at 11:15

GoogleCodeExporter commented 8 years ago
I could not reproduce the issue after clearing my cache in the latest
Firefox, please could you try that?

Original comment by will.abson on 16 Feb 2013 at 2:43

GoogleCodeExporter commented 8 years ago
Thought that the problem still existed after cleaning caches in FF.
Now, after updating FF to 19-candidate and again cleaning caches, PDFjs is 
working.
So if this really was a problem with the cache in FF18, I'm not completely 
sure, as I set several steps before trying again. Sorry.

The main thing is that it is working in FF. Thanks.

Original comment by erwin.bo...@gmail.com on 16 Feb 2013 at 5:31

GoogleCodeExporter commented 8 years ago
Great work! Works here as well with 2.5.1.

Thanks!

Original comment by marsv...@gmail.com on 19 Feb 2013 at 10:06