Diffpdf raises ConversionException error while loading shared libraries: libpoppler-qt4.so.4

Symptons

The feature of compare two version of a document raise a ConversionException error while loading shared library named libpoppler-qt4.so.4.

Cause

In the latest OS versions the libpoppler-qt4.so.4 was replaced by newer version

Solution

Ubuntu 20.04

  • Install the required packages:

$ sudo apt-get install xvfb

  • Modify "setenv.sh" and add the path of the diffpdf version 4 libraries:

Before the modification:

CATALINA_PID=$CATALINA_HOME/catalina.pid
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/bin/cadviewer

After the modification:

CATALINA_PID=$CATALINA_HOME/catalina.pid
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/bin/cadviewer
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib/diffpdf
  • Stop OpenKM service.
  • Finally uncomment the corresponding lines from the Tomcat service script at /etc/init.d/openkm:
$ECHO "Starting Xvfb"
Xvfb :1 &
export DISPLAY=:1

and

$ECHO "Stopping Xvfb"
killall Xvfb
  • Start OpenKM service. 

If when starting the OpenKM service you see this warning: "Warning: The unit file, source configuration file or drop-ins of openkm.service changed on disk. Run 'systemctl daemon-reload' to reload units.", please run 

this command:

systemctl daemon-reload

If the diffpdf service still not work and fails with "diffpdf: cannot connect to X server" try adding the "export DISPLAY=:1" line at the end of $TOMCAT_HOME/setenv.sh file.

If the problem persist, try to modify the system.diffpdf prepending the "/usr/bin/xvfb-run" command, like this:

/usr/bin/xvfb-run /home/openkm/tomcat-8.5.63/bin/diffpdf ${fileIn1} ${fileIn2} ${fileOut}

Ubuntu 18.04

  • Install the required packages:

$ sudo apt-get install xvfb libqtgui4 libpoppler-qt4

  • Modify "setenv.sh" and add the path of the diffpdf version 4 libraries:

Before the modification:

CATALINA_PID=$CATALINA_HOME/catalina.pid
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/bin/cadviewer

After the modification:

CATALINA_PID=$CATALINA_HOME/catalina.pid
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/bin/cadviewer:$CATALINA_HOME/lib/diffpdf
  • Stop OpenKM service.
  • Finally uncomment the corresponding lines from the Tomcat service script at /etc/init.d/openkm:
$ECHO "Starting Xvfb"
Xvfb :1 &
export DISPLAY=:1

and

$ECHO "Stopping Xvfb"
killall Xvfb
  • Start OpenKM service.

CentOS

$ yum install xorg-x11-server-Xvfb poppler-qt
$ ln -s /lib64/libpoppler-qt4.so.14.4.0 /lib64/libpoppler-qt4.so.4

  • Stop OpenKM service.
  • Finally uncomment the corresponding lines from the Tomcat service script at /etc/init.d/openkm:
$ECHO "Starting Xvfb"
Xvfb :1 &
export DISPLAY=:1

and

$ECHO "Stopping Xvfb"
killall Xvfb
  • Start OpenKM service.

If the diffpdf service still not work and fails with "diffpdf: cannot connect to X server" try adding the "export DISPLAY=:1" line at the end of $TOMCAT_HOME/setenv.sh file.

If the problem persist, try to modify the system.diffpdf prepending the "/usr/bin/xvfb-run" command, like this:

/usr/bin/xvfb-run /home/openkm/tomcat-8.5.63/bin/diffpdf ${fileIn1} ${fileIn2} ${fileOut}

 

Properties

Properties

Date

2019-03-03

Applies to

  • Core

Keywords

  • AllVersions
  •