<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: pdfjs not working sometimes on Chrome 92 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122525#M33577</link>
    <description>&lt;P&gt;Ok, thanks, Axel. Anyway, we have tried it with version 2.5.7 (the one that Alfresco 7 uses) and it also fails in the latest version of Chrome. And reading the post that I linked, it seems that it also fails in 2.6.347. I guess we will have to try to migrate to 2.9.359 manually.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 14:29:52 GMT</pubDate>
    <dc:creator>eljuaner</dc:creator>
    <dc:date>2021-08-05T14:29:52Z</dc:date>
    <item>
      <title>pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122523#M33575</link>
      <description>&lt;P&gt;Last week we updated Chrome to version&amp;nbsp;&lt;SPAN&gt;92.0.4515 and after that the preview of some pdf files is not working (it still works for some others).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We think it's a problem with the version of pdfjs, which it happens in Edge and Firefox too (not in Opera), and we&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;have found similar issues for another technologies, related to old versions of pdfjs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://github.com/wojtekmaj/react-pdf/issues/819" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/wojtekmaj/react-pdf/issues/819&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://stackoverflow.com/questions/68581278/pdfs-not-rendering-perfectly-after-chrome-92-version-updatesame-with-firefox-ve" target="_blank" rel="noopener nofollow noreferrer"&gt;https://stackoverflow.com/questions/68581278/pdfs-not-rendering-perfectly-after-chrome-92-version-updatesame-with-firefox-ve&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have tried to replace the pdfjs version of Share (Alfresco Share 6.2 in my case) with a newer one but it seems that it is not easy, at least for me. Has anyone else had this issue? From what I've seen, it also happens in Alfresco Share 7.0&lt;/P&gt;&lt;P&gt;This file can be used to test:&amp;nbsp;&lt;A href="https://github.com/wojtekmaj/react-pdf/files/6892265/broken_pdf_bill.pdf" target="_blank" rel="noopener nofollow noreferrer"&gt;https://github.com/wojtekmaj/react-pdf/files/6892265/broken_pdf_bill.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and best regards&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 15:50:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122523#M33575</guid>
      <dc:creator>eljuaner</dc:creator>
      <dc:date>2021-08-03T15:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122524#M33576</link>
      <description>&lt;P&gt;I upgraded pdfjs to 2.6.347 for a customer on ACS 6.2 earlier this year due to broken PDF rendering on some browsers for some types of PDF files. Due to Aikau and some config / API changes in pdfjs, you also need to adapt the PdfJs.js file in Share's /components/preview/ static resource path. My customisation did not directly update the pdfjs version included with Aikau, which should probably done if you also want previews in the faceted search result screen to work properly (not really relevant for the customer's case).&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 06:43:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122524#M33576</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-08-04T06:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122525#M33577</link>
      <description>&lt;P&gt;Ok, thanks, Axel. Anyway, we have tried it with version 2.5.7 (the one that Alfresco 7 uses) and it also fails in the latest version of Chrome. And reading the post that I linked, it seems that it also fails in 2.6.347. I guess we will have to try to migrate to 2.9.359 manually.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 14:29:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122525#M33577</guid>
      <dc:creator>eljuaner</dc:creator>
      <dc:date>2021-08-05T14:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122526#M33578</link>
      <description>&lt;P&gt;I share my solution to this if you don't want to upgrade the whole component.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As suggested in&amp;nbsp;&lt;A href="https://github.com/mozilla/pdf.js/issues/13870" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/mozilla/pdf.js/issues/13870&lt;/A&gt; you can change the line 38748 of file pdf.worker.js from this:&lt;/P&gt;&lt;P&gt;var widths = [];&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;var widths = Object.create(null);&lt;/P&gt;&lt;P&gt;And everything will work fine.&lt;/P&gt;&lt;P&gt;You will have to recreate the min file or delete it.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 08:14:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122526#M33578</guid>
      <dc:creator>eljuaner</dc:creator>
      <dc:date>2021-08-09T08:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122527#M33579</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/55590"&gt;@eljuaner&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for posting your solution - really helpful to other users!&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 09:07:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122527#M33579</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2021-08-10T09:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122528#M33580</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;UPDATE&lt;/STRONG&gt;: &lt;SPAN class="Y2IQFc"&gt;I posted this question as a separate &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/309714#M25713" target="_self" rel="nofollow noopener noreferrer"&gt;question&lt;/A&gt;&amp;nbsp;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have an Alfresco 5.0 CE (we use share-frontend) and upgraded to version pdf.js 1.10.100 (with the help of this &lt;A href="https://github.com/Alfresco/share/pull/170" target="_self" rel="nofollow noopener noreferrer"&gt;merge&lt;/A&gt;&amp;nbsp;), because of rendering issues. 1.10.100 is the last 1.x version of pdfjs. Unfortunately my rendering issues are not resolved completely. So I tried to move to a 2.x version of pdfjs, but I'm struggling with it. I get an &lt;STRONG&gt;&lt;SPAN class="message-body-wrapper"&gt;&lt;SPAN class="message-flex-body"&gt;&lt;SPAN class="message-body devtools-monospace"&gt;Uncaught &lt;SPAN class="objectBox-stackTrace reps-custom-format"&gt;ReferenceError: &lt;SPAN class="objectBox objectBox-string"&gt;PDFJS is not define. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="message-body-wrapper"&gt;&lt;SPAN class="message-flex-body"&gt;&lt;SPAN class="message-body devtools-monospace"&gt;&lt;SPAN class="objectBox-stackTrace reps-custom-format"&gt;&lt;SPAN class="objectBox objectBox-string"&gt;I have to adapt the PdfJs.js file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="message-body-wrapper"&gt;&lt;SPAN class="message-flex-body"&gt;&lt;SPAN class="message-body devtools-monospace"&gt;&lt;SPAN class="objectBox-stackTrace reps-custom-format"&gt;&lt;SPAN class="objectBox objectBox-string"&gt;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16045"&gt;@afaust&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class="message-body-wrapper"&gt;&lt;SPAN class="message-flex-body"&gt;&lt;SPAN class="message-body devtools-monospace"&gt;&lt;SPAN class="objectBox-stackTrace reps-custom-format"&gt;&lt;SPAN class="objectBox objectBox-string"&gt;Please can you help me? I read, that you did an upgrade of pdfjs, so I think you have a PdfJs-Module, which should work with pdfjs 2.x? It would be very nice, if you could respond. Do you have a recommendation for me&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Best regards&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 17:50:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122528#M33580</guid>
      <dc:creator>wuarmin</dc:creator>
      <dc:date>2021-10-11T17:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122529#M33581</link>
      <description>&lt;P&gt;Hello Axel,&lt;/P&gt;&lt;P&gt;May I ask you how did you update the version of pdfjs? My very first try was a bit of brute force, building both generic and minified versions of pdf.js freshly taken from the repo [1] and copying them under&amp;nbsp;/usr/local/tomcat/webapps/share/components/preview/pdfjs/ Unfortunately with this I am getting an ugly error in the javascript console &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;PRE&gt;Uncaught ReferenceError: PDFJS is not defined&lt;/PRE&gt;&lt;P&gt;You mentioned that&amp;nbsp;&lt;EM&gt;"&lt;SPAN&gt;you also need to adapt the PdfJs.js file in Share's /components/preview/ static resource&lt;/SPAN&gt; path"&amp;nbsp;&lt;/EM&gt;I am wondering if you could share this bit, I am sure that it can be very helpful to other users.&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;P&gt;ps: very nice hack Juan! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://github.com/mozilla/pdf.js" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/mozilla/pdf.js&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;$ gulp generic
$ gulp minified &lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Apr 2022 18:17:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122529#M33581</guid>
      <dc:creator>uo67113</dc:creator>
      <dc:date>2022-04-25T18:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: pdfjs not working sometimes on Chrome 92</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122530#M33582</link>
      <description>&lt;P&gt;Hello Axel,&lt;/P&gt;&lt;P&gt;Ups, I've realized that you posted your solution &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/309714#M25713" target="_self" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt; thanks! I am having a look&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 07:45:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdfjs-not-working-sometimes-on-chrome-92/m-p/122530#M33582</guid>
      <dc:creator>uo67113</dc:creator>
      <dc:date>2022-04-26T07:45:14Z</dc:date>
    </item>
  </channel>
</rss>

