<?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: Customizing Aikau PdfJs Preview Widget in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23985#M10429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Aikau PDF.js previewer is currently only used within the Faceted Search page for the preview popup when you click on the thumbnail of a document in the search result. The preview in the document-details page is a non-Aikau PDF.js instance. The package you are targeting (org.alfresco.modules.preview) does not contain a web script that is using Aikau / model.jsonModel at all, so there is nothing to customise. Also, your JavaScript file is called myco-previewer.get.js so the Surf customisation will only work for an Alfresco file /alfresco/site-webscripts/org/alfresco/modules/preview/myco-previewer.get.js - such a file does not exist.&lt;/P&gt;&lt;P&gt;Lastly, the document-details page is currently not based on the Aikau-based details page, which is only an experimental / work-in-progress page. This is a result of Alfresco not prioritising the migration of old YUI-based pages over to Aikau in the last years. So to customise the document previewer you would need to customise the legacy YUI PDF.js previewer component.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2017 14:42:09 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2017-02-23T14:42:09Z</dc:date>
    <item>
      <title>Customizing Aikau PdfJs Preview Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23984#M10428</link>
      <description>Hi,I'm pretty new to Share development so please bear with me.What I'd like to do is the following :1) Change the behaviour of the Aikau PdfJs viewer, so that it is maximized by default.2) Show the PDF outline/thumbnail sidebar by default.So, far I'm failing to make much progress on&amp;nbsp;1) - i've got th</description>
      <pubDate>Thu, 23 Feb 2017 11:40:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23984#M10428</guid>
      <dc:creator>keith_bailey</dc:creator>
      <dc:date>2017-02-23T11:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Aikau PdfJs Preview Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23985#M10429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Aikau PDF.js previewer is currently only used within the Faceted Search page for the preview popup when you click on the thumbnail of a document in the search result. The preview in the document-details page is a non-Aikau PDF.js instance. The package you are targeting (org.alfresco.modules.preview) does not contain a web script that is using Aikau / model.jsonModel at all, so there is nothing to customise. Also, your JavaScript file is called myco-previewer.get.js so the Surf customisation will only work for an Alfresco file /alfresco/site-webscripts/org/alfresco/modules/preview/myco-previewer.get.js - such a file does not exist.&lt;/P&gt;&lt;P&gt;Lastly, the document-details page is currently not based on the Aikau-based details page, which is only an experimental / work-in-progress page. This is a result of Alfresco not prioritising the migration of old YUI-based pages over to Aikau in the last years. So to customise the document previewer you would need to customise the legacy YUI PDF.js previewer component.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 14:42:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23985#M10429</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-02-23T14:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Aikau PdfJs Preview Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23986#M10430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Axel, most informative.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oh dear - well, at least I know my confusion was justified - I was directed to&amp;nbsp;&lt;A class="link-titled" href="https://dev.alfresco.com/resource/docs/aikau-jsdoc/PdfJs.html" title="https://dev.alfresco.com/resource/docs/aikau-jsdoc/PdfJs.html" rel="nofollow noopener noreferrer"&gt;JSDoc: Module: alfresco/preview/PdfJs/PdfJs&lt;/A&gt;&amp;nbsp; by Alfresco Support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wasn't sure about the naming of my customised&amp;nbsp;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;.get.js - in fact i've just tried renaming it to pdfjs.get.js, and I can see it gets loaded now, which is a start.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;I'll go back to support with this information and ask them to advise on your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Keith&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2017 15:21:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23986#M10430</guid>
      <dc:creator>keith_bailey</dc:creator>
      <dc:date>2017-02-23T15:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing Aikau PdfJs Preview Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23987#M10431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;I’ve had some success. &amp;nbsp;I’m sure there is a ‘nicer’ way of doing this, although I suspect the benefit is marginal given where I had to perform the change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;I modified the non-Aikau PdfJs.js directly : Initially I tried changing the value of the “maximized” &amp;nbsp;to ‘true’ in the configuration attributes – this had no effect. I did, however have some success by calling&amp;nbsp; the this.onMaximizeClick() at the end of _loadPdf. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;I placed the file in in an amp at :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;/src/main/amp/web/components/preview/PdfJs.js&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;This had the effect of overwriting the OOTB file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;Unfortunately attempting to call onSideBarToggle() in the same place didn’t work, but I suspect this is because it’s happing too early during the rendering of the JS. If there was a way to fire the OOTB javascript methods after the viewer has been loaded, that would remove the need to replace the standard product.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; color: #1f497d;"&gt;So, I’m nearly there! &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 10:29:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/customizing-aikau-pdfjs-preview-widget/m-p/23987#M10431</guid>
      <dc:creator>keith_bailey</dc:creator>
      <dc:date>2017-03-01T10:29:07Z</dc:date>
    </item>
  </channel>
</rss>

