<?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: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120070#M33009</link>
    <description>&lt;P&gt;I extracted a DIFF file from the patched PdfJs.js file for Share (as components/preview/PdfJs.js) and the original for Alfresco 7.0 - note that some changes are only due to my code QA setup with automatic JS linting. Unfortunately I cannot attach text-based files, so it'll have to be an inline code block:&lt;/P&gt;
&lt;PRE&gt;38d37
&amp;lt;  // File patched by Axel Faust (Acosix GmbH) to upgrade PDFJS to 2.6.347
43a43
&amp;gt;    var K_CSS_UNITS = 96.0 / 72.0;
59,61d58
&amp;lt;    // Note: PDFJS may be loaded out-of-order with this file
&amp;lt;    var PDFJS;
&amp;lt; 
71,85d67
&amp;lt;       // lazy lookup
&amp;lt;       if (!PDFJS) {
&amp;lt;          // newer PDFJS (2.x) may be caught by Aikau's global AMD define (amd.js typically loaded before most other dependencies)
&amp;lt;          // Aikau's included PDFJS is actually older than Share's default (1.3.91 vs 1.10.100) and does not hook into AMD define
&amp;lt;          if (typeof pdfjsLib !== 'undefined') {
&amp;lt;             PDFJS = pdfjsLib;
&amp;lt;          } else if (typeof require === 'function') {
&amp;lt;             require(['pdfjs-dist/build/pdf'], function(pdfjs) {
&amp;lt;                 PDFJS = pdfjs;
&amp;lt;             });
&amp;lt;          } else {
&amp;lt;             console.error('Neither PDFJS nor AMD require available');
&amp;lt;          }
&amp;lt;       }
&amp;lt; 
618c600
&amp;lt;          this.onPdfLoaded.subscribe(function onPdfLoadEnableButtons() {
---
&amp;gt;          this.onPdfLoaded.subscribe(function onPdfLoadEnableButtons(p_type, p_args) {
692c674
&amp;lt;             fn: function () {
---
&amp;gt;             fn: function (e) {
728c710,711
&amp;lt;                var docHeight = Dom.getDocumentHeight(),
---
&amp;gt;                var sourceYuiEl = new YAHOO.util.Element(this.wp.getPreviewerElement()),
&amp;gt;                    docHeight = Dom.getDocumentHeight(),
773c756,757
&amp;lt;                   var docHeight = Dom.getDocumentHeight(),
---
&amp;gt;                   var sourceYuiEl = new YAHOO.util.Element(this.wp.getPreviewerElement()),
&amp;gt;                       docHeight = Dom.getDocumentHeight(),
817c801
&amp;lt;          var fileurl = this.attributes.src ? this.wp.getThumbnailUrl(this.attributes.src) : this.wp.getContentUrl();
---
&amp;gt;          var me = this, fileurl = this.attributes.src ? this.wp.getThumbnailUrl(this.attributes.src) : this.wp.getContentUrl();
850c834
&amp;lt;             this.onPdfLoaded.subscribe(function onPdfLoadStopSpinner() {
---
&amp;gt;             this.onPdfLoaded.subscribe(function onPdfLoadStopSpinner(p_type, p_args) {
860,861c844
&amp;lt;          PDFJS.GlobalWorkerOptions.workersrc=this.workerSrc;
&amp;lt; 
---
&amp;gt;          PDFJS.workersrc=this.workerSrc;
863,864c846,847
&amp;lt;          params.cMapUrl = './cmaps/';
&amp;lt;          params.cMapPacked = true;
---
&amp;gt;          PDFJS.cMapUrl = './cmaps/';
&amp;gt;          PDFJS.cMapPacked = true;
867c850,851
&amp;lt;          if (this.attributes.progressiveLoading == "true")
---
&amp;gt;          // We also test if it may already be set to true by compatibility.js tests, some browsers do not support it.
&amp;gt;          if (this.attributes.progressiveLoading == "true" &amp;amp;&amp;amp; PDFJS.disableRange != true)
869c853
&amp;lt;              params.disableRange = false;
---
&amp;gt;              PDFJS.disableRange = false;
871c855
&amp;lt;              params.disableAutoFetch = false;
---
&amp;gt;              PDFJS.disableAutoFetch = false;
875c859
&amp;lt;              params.disableRange = true;
---
&amp;gt;              PDFJS.disableRange = true;
880c864
&amp;lt;             Alfresco.logger.debug("Using PDFJS params.disableRange=" + params.disableRange + " params.disableAutoFetch:" + params.disableAutoFetch);
---
&amp;gt;             Alfresco.logger.debug("Using PDFJS.disableRange=" + PDFJS.disableRange + " PDFJS.disableAutoFetch:" + PDFJS.disableAutoFetch);
884c868
&amp;lt;          PDFJS.getDocument(params).promise.then
---
&amp;gt;          PDFJS.getDocument(params).then
928c912
&amp;lt;                var id = Alfresco.util.generateDomId(),
---
&amp;gt;                var me = this, id = Alfresco.util.generateDomId(),
969c953
&amp;lt;                }, function onPasswordEnter() {
---
&amp;gt;                }, function onPasswordEnter(e) {
1124c1108
&amp;lt;       _updateZoomControls : function PdfJs__updateZoomControls()
---
&amp;gt;       _updateZoomControls : function PdfJs__updateZoomControls(n)
1297c1281
&amp;lt;       onSidebarToggle : function PdfJs_onSidebarToggle()
---
&amp;gt;       onSidebarToggle : function PdfJs_onSidebarToggle(e_obj)
1325a1310,1314
&amp;gt;          var goToPage = function goToPage(e, obj) {
&amp;gt;             YAHOO.util.Event.stopEvent(e);
&amp;gt;             this._scrollToPage(obj.pn);
&amp;gt;          };
&amp;gt; 
1351c1340
&amp;lt;       onPagePrevious : function PdfJs_onPagePrevious()
---
&amp;gt;       onPagePrevious : function PdfJs_onPagePrevious(e_obj)
1364c1353
&amp;lt;       onPageNext : function PdfJs_onPageNext()
---
&amp;gt;       onPageNext : function PdfJs_onPageNext(e_obj)
1378c1367
&amp;lt;       onFullScreen : function PdfJs_onFullScreen()
---
&amp;gt;       onFullScreen : function PdfJs_onFullScreen(e_obj)
1560c1549
&amp;lt;       onFindChangeMatchCase : function PdfJs_onFindChangeMatchCase()
---
&amp;gt;       onFindChangeMatchCase : function PdfJs_onFindChangeMatchCase(e_obj)
1565c1554
&amp;lt;       onFindChangeHighlight : function PdfJs_onFindChangeHighlight()
---
&amp;gt;       onFindChangeHighlight : function PdfJs_onFindChangeHighlight(e_obj)
1643c1632
&amp;lt;       onZoomOut : function PdfJs_onZoomOut()
---
&amp;gt;       onZoomOut : function PdfJs_onZoomOut(p_obj)
1656c1645
&amp;lt;       onZoomIn : function PdfJs_onZoomIn()
---
&amp;gt;       onZoomIn : function PdfJs_onZoomIn(p_obj)
1671c1660,1661
&amp;lt;          var oMenuItem = p_aArgs[1];   // MenuItem instance that was the target of the event
---
&amp;gt;          var oEvent = p_aArgs[0],      // DOM event
&amp;gt;              oMenuItem = p_aArgs[1];   // MenuItem instance that was the target of the event
1684c1674
&amp;lt;       onDownloadClick : function PdfJs_onDownloadClick()
---
&amp;gt;       onDownloadClick : function PdfJs_onDownloadClick(p_obj)
1694c1684
&amp;lt;       onDownloadPDFClick : function PdfJs_onDownloadPDFClick()
---
&amp;gt;       onDownloadPDFClick : function PdfJs_onDownloadPDFClick(p_obj)
1704c1694
&amp;lt;       onMaximizeClick : function PdfJs_onMaximizeClick()
---
&amp;gt;       onMaximizeClick : function PdfJs_onMaximizeClick(p_obj)
1751c1741
&amp;lt;       onLinkClick : function PdfJs_onLinkClick()
---
&amp;gt;       onLinkClick : function PdfJs_onLinkClick(p_obj)
1777a1768
&amp;gt;             var slideurl = window.location.href.replace(window.location.hash, "") + "#page=" + this.pageNum;
1830c1821
&amp;lt;       onRecalculatePreviewLayout : function PdfJs_onRecalculatePreviewLayout()
---
&amp;gt;       onRecalculatePreviewLayout : function PdfJs_onRecalculatePreviewLayout(p_obj)
1858c1849
&amp;lt;       onWindowHashChange : function PdfJs_onWindowHashChange()
---
&amp;gt;       onWindowHashChange : function PdfJs_onWindowHashChange(p_obj)
1969c1960
&amp;lt;       getVPos : function DocumentPage_getVPos()
---
&amp;gt;       getVPos : function DocumentPage_getVPos(page)
1996c1987
&amp;lt;          var viewport = this.content.getViewport({scale: this.parent.currentScale});
---
&amp;gt;          var viewport = this.content.getViewport(this.parent.currentScale);
2007a1999
&amp;gt;              view = content.view,
2058c2050
&amp;lt;       _setPageSize : function DocumentPage__setPageSize()
---
&amp;gt;       _setPageSize : function DocumentPage__setPageSize(page)
2060c2052
&amp;lt;          var viewPort = this.content.getViewport({scale: this.parent.currentScale});
---
&amp;gt;          var viewPort = this.content.getViewport(this.parent.currentScale);
2436,2438c2428,2430
&amp;lt;                 contentWidth = parseInt(currentPage.content.view[2]),
&amp;lt;                 contentHeight = parseInt(currentPage.content.view[3]),
&amp;lt;                 rotation = currentPage.content.rotate,
---
&amp;gt;                 contentWidth = parseInt(currentPage.content.pageInfo.view[2]),
&amp;gt;                 contentHeight = parseInt(currentPage.content.pageInfo.view[3]),
&amp;gt;                 rotation = currentPage.content.pageInfo.rotate,
2594c2586
&amp;lt;       onScroll : function DocumentView_onScroll()
---
&amp;gt;       onScroll : function DocumentView_onScroll(e_obj)
&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Oct 2021 07:50:30 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2021-10-13T07:50:30Z</dc:date>
    <item>
      <title>PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120067#M33006</link>
      <description>&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an Alfresco 5.0 CE application (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 PDF- rendering issues. 1.10.100 is the last 1.x version of pdf.js. Unfortunately my rendering issues are not resolved completely. So I tried to move to a 2.x (I tested it, there my issues are resolved) version of pdf.js, 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;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16045"&gt;@afaust&lt;/A&gt;&amp;nbsp;&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? Can you give me some hints? I read, that you did an upgrade of pdf.js, 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;&lt;P&gt;--wuarmin&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 12 Oct 2021 10:47:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120067#M33006</guid>
      <dc:creator>wuarmin</dc:creator>
      <dc:date>2021-10-12T10:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120068#M33007</link>
      <description>&lt;P&gt;The "crowbar"-solution in our case would simply be to use the viewer of the browser. What do you think about it?&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;/P&gt;&lt;P&gt;--wuarmin&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 11:40:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120068#M33007</guid>
      <dc:creator>wuarmin</dc:creator>
      <dc:date>2021-10-12T11:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120069#M33008</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;thank you for the response.&lt;/P&gt;&lt;P&gt;My rendering issues have nothing to do with transformations. It's only about certain PDF's that the old pdf.js (1.x) version can't display. &lt;SPAN class="Y2IQFc"&gt;It's really just about an update of the pdf.js lib. With 2.x there were breaking changes and thus replacing the pdf.js lib is not that easy. I have to adapt the Alfresco PdfJS-Module.Maybe someone has already done this job and can help me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;--wuarmin&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 12:24:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120069#M33008</guid>
      <dc:creator>wuarmin</dc:creator>
      <dc:date>2021-10-12T12:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120070#M33009</link>
      <description>&lt;P&gt;I extracted a DIFF file from the patched PdfJs.js file for Share (as components/preview/PdfJs.js) and the original for Alfresco 7.0 - note that some changes are only due to my code QA setup with automatic JS linting. Unfortunately I cannot attach text-based files, so it'll have to be an inline code block:&lt;/P&gt;
&lt;PRE&gt;38d37
&amp;lt;  // File patched by Axel Faust (Acosix GmbH) to upgrade PDFJS to 2.6.347
43a43
&amp;gt;    var K_CSS_UNITS = 96.0 / 72.0;
59,61d58
&amp;lt;    // Note: PDFJS may be loaded out-of-order with this file
&amp;lt;    var PDFJS;
&amp;lt; 
71,85d67
&amp;lt;       // lazy lookup
&amp;lt;       if (!PDFJS) {
&amp;lt;          // newer PDFJS (2.x) may be caught by Aikau's global AMD define (amd.js typically loaded before most other dependencies)
&amp;lt;          // Aikau's included PDFJS is actually older than Share's default (1.3.91 vs 1.10.100) and does not hook into AMD define
&amp;lt;          if (typeof pdfjsLib !== 'undefined') {
&amp;lt;             PDFJS = pdfjsLib;
&amp;lt;          } else if (typeof require === 'function') {
&amp;lt;             require(['pdfjs-dist/build/pdf'], function(pdfjs) {
&amp;lt;                 PDFJS = pdfjs;
&amp;lt;             });
&amp;lt;          } else {
&amp;lt;             console.error('Neither PDFJS nor AMD require available');
&amp;lt;          }
&amp;lt;       }
&amp;lt; 
618c600
&amp;lt;          this.onPdfLoaded.subscribe(function onPdfLoadEnableButtons() {
---
&amp;gt;          this.onPdfLoaded.subscribe(function onPdfLoadEnableButtons(p_type, p_args) {
692c674
&amp;lt;             fn: function () {
---
&amp;gt;             fn: function (e) {
728c710,711
&amp;lt;                var docHeight = Dom.getDocumentHeight(),
---
&amp;gt;                var sourceYuiEl = new YAHOO.util.Element(this.wp.getPreviewerElement()),
&amp;gt;                    docHeight = Dom.getDocumentHeight(),
773c756,757
&amp;lt;                   var docHeight = Dom.getDocumentHeight(),
---
&amp;gt;                   var sourceYuiEl = new YAHOO.util.Element(this.wp.getPreviewerElement()),
&amp;gt;                       docHeight = Dom.getDocumentHeight(),
817c801
&amp;lt;          var fileurl = this.attributes.src ? this.wp.getThumbnailUrl(this.attributes.src) : this.wp.getContentUrl();
---
&amp;gt;          var me = this, fileurl = this.attributes.src ? this.wp.getThumbnailUrl(this.attributes.src) : this.wp.getContentUrl();
850c834
&amp;lt;             this.onPdfLoaded.subscribe(function onPdfLoadStopSpinner() {
---
&amp;gt;             this.onPdfLoaded.subscribe(function onPdfLoadStopSpinner(p_type, p_args) {
860,861c844
&amp;lt;          PDFJS.GlobalWorkerOptions.workersrc=this.workerSrc;
&amp;lt; 
---
&amp;gt;          PDFJS.workersrc=this.workerSrc;
863,864c846,847
&amp;lt;          params.cMapUrl = './cmaps/';
&amp;lt;          params.cMapPacked = true;
---
&amp;gt;          PDFJS.cMapUrl = './cmaps/';
&amp;gt;          PDFJS.cMapPacked = true;
867c850,851
&amp;lt;          if (this.attributes.progressiveLoading == "true")
---
&amp;gt;          // We also test if it may already be set to true by compatibility.js tests, some browsers do not support it.
&amp;gt;          if (this.attributes.progressiveLoading == "true" &amp;amp;&amp;amp; PDFJS.disableRange != true)
869c853
&amp;lt;              params.disableRange = false;
---
&amp;gt;              PDFJS.disableRange = false;
871c855
&amp;lt;              params.disableAutoFetch = false;
---
&amp;gt;              PDFJS.disableAutoFetch = false;
875c859
&amp;lt;              params.disableRange = true;
---
&amp;gt;              PDFJS.disableRange = true;
880c864
&amp;lt;             Alfresco.logger.debug("Using PDFJS params.disableRange=" + params.disableRange + " params.disableAutoFetch:" + params.disableAutoFetch);
---
&amp;gt;             Alfresco.logger.debug("Using PDFJS.disableRange=" + PDFJS.disableRange + " PDFJS.disableAutoFetch:" + PDFJS.disableAutoFetch);
884c868
&amp;lt;          PDFJS.getDocument(params).promise.then
---
&amp;gt;          PDFJS.getDocument(params).then
928c912
&amp;lt;                var id = Alfresco.util.generateDomId(),
---
&amp;gt;                var me = this, id = Alfresco.util.generateDomId(),
969c953
&amp;lt;                }, function onPasswordEnter() {
---
&amp;gt;                }, function onPasswordEnter(e) {
1124c1108
&amp;lt;       _updateZoomControls : function PdfJs__updateZoomControls()
---
&amp;gt;       _updateZoomControls : function PdfJs__updateZoomControls(n)
1297c1281
&amp;lt;       onSidebarToggle : function PdfJs_onSidebarToggle()
---
&amp;gt;       onSidebarToggle : function PdfJs_onSidebarToggle(e_obj)
1325a1310,1314
&amp;gt;          var goToPage = function goToPage(e, obj) {
&amp;gt;             YAHOO.util.Event.stopEvent(e);
&amp;gt;             this._scrollToPage(obj.pn);
&amp;gt;          };
&amp;gt; 
1351c1340
&amp;lt;       onPagePrevious : function PdfJs_onPagePrevious()
---
&amp;gt;       onPagePrevious : function PdfJs_onPagePrevious(e_obj)
1364c1353
&amp;lt;       onPageNext : function PdfJs_onPageNext()
---
&amp;gt;       onPageNext : function PdfJs_onPageNext(e_obj)
1378c1367
&amp;lt;       onFullScreen : function PdfJs_onFullScreen()
---
&amp;gt;       onFullScreen : function PdfJs_onFullScreen(e_obj)
1560c1549
&amp;lt;       onFindChangeMatchCase : function PdfJs_onFindChangeMatchCase()
---
&amp;gt;       onFindChangeMatchCase : function PdfJs_onFindChangeMatchCase(e_obj)
1565c1554
&amp;lt;       onFindChangeHighlight : function PdfJs_onFindChangeHighlight()
---
&amp;gt;       onFindChangeHighlight : function PdfJs_onFindChangeHighlight(e_obj)
1643c1632
&amp;lt;       onZoomOut : function PdfJs_onZoomOut()
---
&amp;gt;       onZoomOut : function PdfJs_onZoomOut(p_obj)
1656c1645
&amp;lt;       onZoomIn : function PdfJs_onZoomIn()
---
&amp;gt;       onZoomIn : function PdfJs_onZoomIn(p_obj)
1671c1660,1661
&amp;lt;          var oMenuItem = p_aArgs[1];   // MenuItem instance that was the target of the event
---
&amp;gt;          var oEvent = p_aArgs[0],      // DOM event
&amp;gt;              oMenuItem = p_aArgs[1];   // MenuItem instance that was the target of the event
1684c1674
&amp;lt;       onDownloadClick : function PdfJs_onDownloadClick()
---
&amp;gt;       onDownloadClick : function PdfJs_onDownloadClick(p_obj)
1694c1684
&amp;lt;       onDownloadPDFClick : function PdfJs_onDownloadPDFClick()
---
&amp;gt;       onDownloadPDFClick : function PdfJs_onDownloadPDFClick(p_obj)
1704c1694
&amp;lt;       onMaximizeClick : function PdfJs_onMaximizeClick()
---
&amp;gt;       onMaximizeClick : function PdfJs_onMaximizeClick(p_obj)
1751c1741
&amp;lt;       onLinkClick : function PdfJs_onLinkClick()
---
&amp;gt;       onLinkClick : function PdfJs_onLinkClick(p_obj)
1777a1768
&amp;gt;             var slideurl = window.location.href.replace(window.location.hash, "") + "#page=" + this.pageNum;
1830c1821
&amp;lt;       onRecalculatePreviewLayout : function PdfJs_onRecalculatePreviewLayout()
---
&amp;gt;       onRecalculatePreviewLayout : function PdfJs_onRecalculatePreviewLayout(p_obj)
1858c1849
&amp;lt;       onWindowHashChange : function PdfJs_onWindowHashChange()
---
&amp;gt;       onWindowHashChange : function PdfJs_onWindowHashChange(p_obj)
1969c1960
&amp;lt;       getVPos : function DocumentPage_getVPos()
---
&amp;gt;       getVPos : function DocumentPage_getVPos(page)
1996c1987
&amp;lt;          var viewport = this.content.getViewport({scale: this.parent.currentScale});
---
&amp;gt;          var viewport = this.content.getViewport(this.parent.currentScale);
2007a1999
&amp;gt;              view = content.view,
2058c2050
&amp;lt;       _setPageSize : function DocumentPage__setPageSize()
---
&amp;gt;       _setPageSize : function DocumentPage__setPageSize(page)
2060c2052
&amp;lt;          var viewPort = this.content.getViewport({scale: this.parent.currentScale});
---
&amp;gt;          var viewPort = this.content.getViewport(this.parent.currentScale);
2436,2438c2428,2430
&amp;lt;                 contentWidth = parseInt(currentPage.content.view[2]),
&amp;lt;                 contentHeight = parseInt(currentPage.content.view[3]),
&amp;lt;                 rotation = currentPage.content.rotate,
---
&amp;gt;                 contentWidth = parseInt(currentPage.content.pageInfo.view[2]),
&amp;gt;                 contentHeight = parseInt(currentPage.content.pageInfo.view[3]),
&amp;gt;                 rotation = currentPage.content.pageInfo.rotate,
2594c2586
&amp;lt;       onScroll : function DocumentView_onScroll()
---
&amp;gt;       onScroll : function DocumentView_onScroll(e_obj)
&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Oct 2021 07:50:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120070#M33009</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-10-13T07:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120071#M33010</link>
      <description>&lt;P&gt;Hey &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16045"&gt;@afaust&lt;/A&gt; ,&lt;BR /&gt;&lt;BR /&gt;thank you very much. That is exactly what I need.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 14:23:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120071#M33010</guid>
      <dc:creator>wuarmin</dc:creator>
      <dc:date>2021-10-14T14:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120072#M33011</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/78274"&gt;@wuarmin&lt;/A&gt;&amp;nbsp;- great to hear that&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16045"&gt;@afaust&lt;/A&gt;'s solution helped! Please feel free to mark his answer as a solution to this question to help others out who may have a similar issue.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 15:33:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120072#M33011</guid>
      <dc:creator>amanda_roberts</dc:creator>
      <dc:date>2021-10-15T15:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120073#M33012</link>
      <description>&lt;P&gt;Hey, &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/16045"&gt;@afaust&lt;/A&gt; and &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/86605"&gt;@amanda_roberts&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN class="Y2IQFc"&gt;thanks again, I just noticed that I had to change the following line (keyword: camelcase) so that an update of the library would work.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PDFJS.GlobalWorkerOptions.workersrc=this.workerSrc;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;PDFJS.GlobalWorkerOptions.workersrc=this.workerSrc;&lt;/PRE&gt;&lt;DIV class="QmZWSe"&gt;&lt;DIV class="DHcWmd"&gt;&lt;SPAN class="Y2IQFc"&gt;Can you explain that to yourself?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="DHcWmd"&gt;&lt;SPAN class="Y2IQFc"&gt;Best regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="DHcWmd"&gt;&lt;SPAN class="Y2IQFc"&gt;wuarmin&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Oct 2021 09:21:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120073#M33012</guid>
      <dc:creator>wuarmin</dc:creator>
      <dc:date>2021-10-18T09:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120074#M33013</link>
      <description>&lt;P&gt;If there's supposed to be a change in case, I must admit, I cannot see it. Both lines are identical.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 11:14:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120074#M33013</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-10-18T11:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120075#M33014</link>
      <description>&lt;P&gt;Sorry &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;, my mistake, here once again:&lt;/P&gt;&lt;PRE&gt;PDFJS.GlobalWorkerOptions.workersrc=this.workerSrc;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE&gt;PDFJS.GlobalWorkerOptions.workersrc=this.workerSrc;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;That should be an alfresco hub problem. I can't capitalize the S in the term: PDFJS.GlobalWorkerOptions.worker&lt;STRONG&gt;S&lt;/STRONG&gt;rc. In the preview it looks ok, but if I save it, it goes away. Maybe the same issue in your DIFF.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;PDFJS.GlobalWorkerOptions.workersrc=this.workerSrc;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;best regards&lt;/P&gt;&lt;P&gt;wuarmin&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 13:14:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120075#M33014</guid>
      <dc:creator>wuarmin</dc:creator>
      <dc:date>2021-10-18T13:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: PDF Preview Issues with pdf.js 1.10.100. How to upgrade share to pdf.js 2.x?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120076#M33015</link>
      <description>&lt;P&gt;Hello Axel,&lt;/P&gt;&lt;P&gt;Thanks for your patch, it works for me! However in my case I ended up hardcoding some paths in the PdfJs script, for instance&lt;/P&gt;&lt;PRE&gt; // lazy lookup
 .../...
    } else if (typeof require === 'function') {
      require(['/share/res/components/preview/pdfjs/pdf.js'], function (pdfjs) {
        console.log('Loading /share/res/components/preview/ module');
        PDFJS = pdfjs;
        console.log('Loaded ' + pdfjs.toString());
      });
    } else {
      console.error('Neither PDFJS nor AMD require available');
    }
  }&lt;/PRE&gt;&lt;P&gt;I had also changed the define path in the webpackUniversalModuleDefinition&lt;/P&gt;&lt;PRE&gt;(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' &amp;amp;&amp;amp; typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' &amp;amp;&amp;amp; define.amd)
		define("/share/res/components/preview/pdfjs/pdf.js", [], factory);
.../...&lt;/PRE&gt;&lt;P&gt;This makes me think that I must be missing something, I do not believe that I should be doing all these hacks &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;Any thoughts on this?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;</description>
      <pubDate>Wed, 27 Apr 2022 12:26:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/pdf-preview-issues-with-pdf-js-1-10-100-how-to-upgrade-share-to/m-p/120076#M33015</guid>
      <dc:creator>uo67113</dc:creator>
      <dc:date>2022-04-27T12:26:44Z</dc:date>
    </item>
  </channel>
</rss>

