There are some cases where you might need a powerful pdf toolkit to use with php. 1and1 does not come with any built in pdf processors or pdf libraries built into php. Here is the process I used to integrate phptk into my 1and1 shared hosting account.
Requirements: 1and1 shared plan that has ssh support
- Download pdftk deb file for debian etch (http://packages.debian.org/etch/i386/pdftk/download):
wget http://ftp.us.debian.org/debian/pool/main/l/pdftk/pdftk_1.40-2_i386.deb
ar xv pdftk_1.40-2_i386.deb
- Extract the data.tar.gz file:
tar xvzf data.tar.gz
- Download libgcj deb file for debian etc (http://packages.debian.org/etch/i386/libgcj7-0/download):
wget http://ftp.us.debian.org/debian/pool/main/g/gcj-4.1/libgcj7-0_4.1.1-20_i386.deb
- Extract the libgcj deb file:
ar xv libgcj7-0_4.1.1-20_i386.deb
- Extract the data.tar.gz file:
tar xvzf data.tar.gz
- Create a script to link libgcj for pdftk (use nano or vi):
#!/bin/bash
LD_LIBRARY_PATH="usr/lib:$LD_LIBRARY_PATH" usr/bin/pdftk $*
- Chmod the pdftk script so it can run:
chmod 755 pdftk
Now you can run pdftk from your main directory and process files from php or cronjobs.





thanks for the tutorial. i think that really helps me with the installation. good post!
really like your way of explanation.i will like to try this and let you know the results.thanks for this quality information you posted here.looking forward for more updates.
Hi,
That article was really looking very nice and very impressive, i think it is a cool and very informative article. Anyways keep it up and keep continue.