Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1069241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:23:29+00:00 2026-05-16T20:23:29+00:00

I am using a Linux Server and am trying to install Pdftk, but I

  • 0

I am using a Linux Server and am trying to install Pdftk, but I am problems trying to figure out what exactly to do.

I found the following documentation on how to install it, but they refer mostly to installing it on the local Windows machine.

They are:
http://www.andrewheiss.com/blog/2009/07/29/installing-pdftk-php/

http://www.accesspdf.com/pdftk/#packages

Can someone help me unserstand exactly what files I need to place where on my server so I can refer to pdftk?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T20:23:30+00:00Added an answer on May 16, 2026 at 8:23 pm

    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.

    To build pdftk on Redhat / CentOS please follow the below instructions.

    ssh [server to install pdftk on]
    

    Now that we are in the server we need to create the directories to store pdftk.

    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
    

    Now we need to install the gcj libraries.

    sudo yum install java-1.4.2-gcj-compat-devel.i386
    

    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.

    sudo yum install gcc-c++
    

    If you compile the application right now you will receive a warning that tmpnam is dangerous to use and you should use mkstemp.

    sudo vi report.cc
    

    Run this from inside VI to do a search and replace for the tmpnam method.

    :%s/tmpnam(/mkstemp(/g
    

    Press escape and save the changes with

    :wq!
    

    Now that we have all the packages installed, we are going to start compiling pdftk-1.41

    from /extra/src/pdftk-1.41/pdftk run the following command

    sudo make -f Makefile.RedHat
    

    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 :).

    Now with the pdftk file created we will want to copy it to the /bin directory so that we can run it from anywhere.

    sudo cp pdftk /usr/local/bin
    

    Let’s make sure the build was successful and run

    pdftk --version
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to install Kyoto Cabinet in the Debian-Linux Server by using this
Im using PHP 5.3 on a linux server and I m trying to query
I'm using ssh to connect with a linux server. I'm trying to upload a
I'm trying to install a Wowza server on my Linux machine to enable the
I am trying to install a google wave server on a linux virtual machine
I'm trying to install virtual-python on linux server which I don't have root access.
I'm trying to install Glassfish 3.1.1 on Centos 6.2 Linux server with Apache HTTP
I'm trying to install a rails server for my application. I'm using ubuntu 10.04
Possible Duplicate: Which JRE I am using I'm trying to figure out whether the
I'm using a linux server that display directories in a bold font, and files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.