cancel
Showing results for 
Search instead for 
Did you mean: 

How can I upgrade pdf.js from 1.5.188 to 3.x or 4.x

Blouson
Champ in-the-making
Champ in-the-making

Hi,

We are running Alfresco 5.2 Community, hosted on an CentOS server.  

Recently, we encountered an issue where viewing large PDF documents either freezes or becomes extremely slow. To address this, we wanted to upgrade the pdf.js version.

We tried modifying the pdf.js and pdf.worker.js files located in the /tomcat/webapps/share/components/preview/pdfjs directory and restarted the service. However, the version still appears as 1.5.188. It seems this version is set during the initial installation of Alfresco. Is there a way to change this version?"

2 REPLIES 2

Blouson
Champ in-the-making
Champ in-the-making

We installed it by alfresco-community-installer-201707-linux-x64.bin file.

4535992
Star Collaborator
Star Collaborator

mmm I don't recommend it for several reasons, then Alfresco 5.2 is out of maintenance and modifying share files is never something I would recommend to someone who is not familiar with the code, it is highly advisable to upgrade your install to an Alfresco 7 with docker or kubernetes (at least), where the transformers for previews have been externalized and can be upgraded separately from Alfresco and Share...
If an upgrade is not possible my advice is to disable preview for pdf above a certain size via global properties to avoid the slowdown, if a person wants to view the big pdf document they can use the “view on browser” option on Share.