Anyone know how to install pdftk for cPanel or CentOS?

wyattbiker

Member
Nov 26, 2010
18
0
51
pdftk allows extraction of pdf data and does other powerful manipulations.

These are the instructions they give but they don't specifically mention CentOS.

Build Pdftk

So I was wondering if redhat is the one I should follow or is it debian?

They also have these. Not sure if these are the binary versions.

Install Pdftk

Any help is appreciated.

Thanks
 

rhenderson

Well-Known Member
Apr 21, 2005
783
2
168
Oklahoma
cPanel Access Level
Root Administrator
pdftk allows extraction of pdf data and does other powerful manipulations.

These are the instructions they give but they don't specifically mention CentOS.

Build Pdftk

So I was wondering if redhat is the one I should follow or is it debian?

They also have these. Not sure if these are the binary versions.

Install Pdftk

Any help is appreciated.

Thanks
I found it with yum

yum install pdftk

But I have added some extra repositories.
 

rhenderson

Well-Known Member
Apr 21, 2005
783
2
168
Oklahoma
cPanel Access Level
Root Administrator
I did some quick checking, you need to have the RPMForge "extra" added to yum for the above to work. Here are the instructions for CentOs 5.x from AdditionalResources/Repositories/RPMForge - CentOS Wiki if you have CentOs 4 do not follow the info below, use the web page.....I have set this up many times but you never know what people might do to the insructions so use at your own risk.

Code:
Log in as root

cd /usr/local/src

Type
uname -i 

To see which package you need
Pick one of the below vdepending on the output of uname -i

i386
wegt http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm 

x86_64 
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm 

Then type
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

Verify the downloaded package
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm

Install RPM
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm

Then
yum install pdftk
 

wyattbiker

Member
Nov 26, 2010
18
0
51
Yep, that did it. I got version 1.41. I did some tests and works great. Their latest version is 1.44. I wonder if there is a way to get that through yum. I tried upgrade/update option but to no avail. Do I need to email someone to update the yum database?

Following are the exact commands I used. Thanks for your help.
Code:
1011  cat /proc/version
 1012  cd /usr/local/src
 1013  uname -i
 1015  wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
 1017  rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
 1018  rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
 1019  rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
 1020  yum install pdftk
 1021  pdftk --version
pdftk 1.41 a Handy Tool for Manipulating PDF Documents
Copyright (C) 2003-06, Sid Steward - Please Visit: http://www.pdftk.com
 

rhenderson

Well-Known Member
Apr 21, 2005
783
2
168
Oklahoma
cPanel Access Level
Root Administrator
I don't know who ports the 10,000+ packages they have from one version to another you could join thier mailing list and ask FrontPage - RPMRepo Wiki

In look at the pdftk web site it looks simple to install, download and unzip the source then type make -f Makefile.RedHat according to thier instructions, as long as the gcc complier is the right version it should compile, I would look at the makefile to be sure. I would also guess you would nee to actually type make -f Makefile.RedHat install

The "Extras" Repo just makes lif easier :) Glad you got it working.
 
Last edited: