ColdFusion 11 – PDF Service prerequisites on Linux

If you are planning to use PDF services on a Linux box with ColdFusion 11, you would need a set of packages to be preinstalled, and would also need to import a set of fonts onto your machine. Though this is called out specifically in the Adobe Live Cycle Documentation, I decided to post a set of out-of-the-box commands that get these prerequisites in place without hassles. These commands use the yum or apt-get package managers to install prerequisites and have been tested on RHEL 6+ and Ubuntu 13.10+.


RedHat, and everything YUM powered,
Execute the below commands from a terminal, or run it from a script file on an RHEL, or any machine with valid yum configurations.

yum -y install glibc.i686 zlib.i686 libX11.i686 ia32-libs expat.i686 freetype.i686 nss-softokn.i686 libxcb.i686 libXau.i686 libXext.i686 libSM.i686 libXrandr.i686 libXrender.i686 libXinerama.i686
yum -y groupinstall "X Window System"
wget http://cgit.freedesktop.org/xorg/font/ibm-type1/snapshot/font-ibm-type1-1.0.3.tar.gz
tar -zxvf font-ibm-type1-1.0.3.tar.gz
cd font-ibm-type1-1.0.3
mv * /usr/share/fonts/
cd ..
rm -rf font-ibm-type1-1.0.3
rm -rf font-ibm-type1-1.0.3.tar.gz



Ubuntu
Execute the below commands from a terminal, or run it from a script file on an Ubuntu with apt-get repositories configured.

#!/bin/sh

export DEBIAN_FRONTEND=noninteractive

# Add dependencies for PDF
dpkg --add-architecture i386
apt-get update

apt-get --assume-yes install glibc-2.*
apt-get --assume-yes install lib32z1
apt-get --assume-yes install lib32ncurses5
apt-get --assume-yes install libbz2-1.0:i386
apt-get --assume-yes install lib32z1-dev
apt-get --assume-yes install libbz2-dev:i386
apt-get --assume-yes install zlib1g
apt-get --assume-yes install libx11*
apt-get --assume-yes install lib32z1
apt-get --assume-yes install lib32ncurses5
apt-get --assume-yes install libbz2-1.0:i386
apt-get --assume-yes install libexpat1
apt-get --assume-yes install libexpat1:i386
apt-get --assume-yes install libfreetype6:i386
apt-get --assume-yes install x-window-*
apt-get --assume-yes install libnss-mdns:i386
apt-get --assume-yes install libxcb1-dev:i386
apt-get --assume-yes install libxcb1-dev
apt-get --assume-yes install libxext6
apt-get --assume-yes install libxext6:i386
apt-get --assume-yes install libsm6
apt-get --assume-yes install libsm6:i386
apt-get --assume-yes install libxrandr2
apt-get --assume-yes install libxrandr2:i386
apt-get --assume-yes install libxrender1
apt-get --assume-yes install libxrender1:i386
apt-get --assume-yes install libxinerama1
apt-get --assume-yes install libxinerama1:i386
wget --no-check-certificate  https://cgit.freedesktop.org/xorg/font/ibm-type1/snapshot/font-ibm-type1-1.0.3.tar.gz
tar -zxvf font-ibm-type1-1.0.3.tar.gz
cd font-ibm-type1-1.0.3
mkdir -p /usr/share/fonts/
mv * /usr/share/fonts/
cd ..
rm -rf font-ibm-type1-1.0.3
rm -rf font-ibm-type1-1.0.3.tar.gz

rm -rf /var/lib/apt/lists/*



Hope this helps!

————-

[8th May 2018]
Updated source for Ubuntu. Breaking up commands seems to be necessary.

[4th Jul 2017]
Updated source for Ubuntu based on the comments by, KnuBew and David Belanger.
> dpkg –add-architecture i386
> apt-get update

ColdFusion 11 - Manually remove connector configuration
Fixing the Null Pointer Exception on ColdFusion



5 Responses to “ColdFusion 11 – PDF Service prerequisites on Linux”

  1. KnuBew

    Thanks for your posting. It helped me a lot.

    I’m using “Debian 7 (wheezy) 64 Bit” Linux.

    To get your “apt-get -y install glibc-2.* …” string working, I had to add the i386 architecture to the Debian packet manager with the following commands, otherwise the Debian packet manager cannot find the “:i386” packages:
    dpkg --add-architecture i386
    apt-get update

    By the way, the “apt-get update” command is required after adding the i386 architecture to the Debian packet manager

  2. I’m using Ubuntu 16.04.4 and CF2016 and some of the libraries mentioned in the script are now outdated and are already included in this Ubuntu version.

    As KnuBew said, I needed to run


    dpkg --add-architecture i386
    apt-get update

    first and then change the following line:


    apt-get -y install lib32z1 lib32ncurses5 lib32z1-dev zlib1g libx11* lib32z1 lib32ncurses5 libexpat1 libexpat1:i386 libfreetype6:i386 x-window-* libxcb1-dev:i386 libxcb1-dev libxext6 libxext6:i386 libsm6 libsm6:i386 libxrandr2 libxrandr2:i386 libxrender1 libxrender1:i386 libxinerama1 libxinerama1:i386

  3. Thanks David.
    Updated the source for Ubuntu.

    However, I do not see any change in the lib list following “apt-get -y install..”. Let me know if I’m missing something!

  4. The change was that

    glibc2.*

    had already been included in Ubuntu 16.04 and would error out when you tried to include it. Then, I had to remove:

    lib32bz2-1.0
    lib32bz2-dev
    lib32bz2-1.0
    lib32nss-mdns

    Because they weren’t found. I suspect they too may have already been included in the 16.04 distribution.

    Cheers,
    David

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>