Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Pdftk is a version of iText which has been converted from Java to c++ and rebuilt with a command-line bridge for easy access from PHP applications. </p> <p>To build pdftk on Redhat / CentOS please follow the below instructions.</p> <pre><code>ssh [server to install pdftk on] </code></pre> <p>Now that we are in the server we need to create the directories to store pdftk.</p> <pre><code>cd / sudo mkdir extra cd extra sudo mkdir src cd src sudo wget http://www.pdfhacks.com/pdftk/pdftk-1.41.tar.gz sudo tar zxvf pdftk-1.41.tar.gz cd pdftk-1.41/pdftk </code></pre> <p>Now we need to install the gcj libraries.</p> <pre><code>sudo yum install java-1.4.2-gcj-compat-devel.i386 </code></pre> <p>The gcc-c++ library doesn't get installed with the gcj package so we will install it now, so we don't get an error halfway through the compile process.</p> <pre><code>sudo yum install gcc-c++ </code></pre> <p>If you compile the application right now you will receive a warning that tmpnam is dangerous to use and you should use mkstemp.</p> <pre><code>sudo vi report.cc </code></pre> <p>Run this from inside VI to do a search and replace for the tmpnam method.</p> <pre><code>:%s/tmpnam(/mkstemp(/g </code></pre> <p>Press escape and save the changes with</p> <pre><code>:wq! </code></pre> <p>Now that we have all the packages installed, we are going to start compiling pdftk-1.41</p> <p>from /extra/src/pdftk-1.41/pdftk run the following command</p> <pre><code>sudo make -f Makefile.RedHat </code></pre> <p>This will kick off the build process for compiling and converting the java file to c++. This could take SEVERAL minutes to convert iText to c++. Go grab yourself a margarita from our new margarita machine in the break room :).</p> <p>Now with the pdftk file created we will want to copy it to the /bin directory so that we can run it from anywhere.</p> <pre><code>sudo cp pdftk /usr/local/bin </code></pre> <p>Let's make sure the build was successful and run</p> <pre><code>pdftk --version </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload