share-extras / media-viewers

Enhanced document previews for a range of different document and media types, plus a dashlet allowing any content item to be displayed on a site dashboard.
Apache License 2.0
29 stars 23 forks source link

How to incorporate latest pdf.js into media viewer? #46

Open sejoon opened 10 years ago

sejoon commented 10 years ago

Dear all

Because pdf.js is already updated multiple times, i'd like to incorporate latest pdf.js files into media viewer sources. What codes should be replaced for this? All 3 files (pdf.js, pdf.worker.js, compatibility.js) under the source/web/extras/components/preview/pdfjs? And it seems that latest pdf js requires cmaps files. Is there any plan for release latest media viewers?

Best Regards. Ahn

hi-ko commented 9 years ago

pdf.js should be updated to the latest release to get bug fixes / to avoid issues with wrong renderings. Just replacing the files don't work and requires additional analysis. I get "TypeError: PDFJS.Promise is undefined" Are there any plans?

loftux commented 9 years ago

I would take the files from http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/slingshot/source/web/components/preview/ Copy the PdfJs.js, PdfJs.css and everything in the folder pdf.js. Not sure if this works but worth a try.

hi-ko commented 9 years ago

Hi Peter - sorry, for the confusion. For any reason the module deployment was gone and I realized to late that it was just the old flash viewer. So I just removed my previous comment. The issue with PDFJS initializing / loading still exists using the latest pdfjs release.