Linux/pdftk

From Omnia
Revision as of 20:41, 18 May 2016 by Kenneth (talk | contribs) (→‎pdftk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

pdftk

If PDF is electronic paper, then pdftk is an electronic staple-remover, hole-punch, binder, secret-decoder-ring, and X-Ray-glasses. Pdftk is a simple tool for doing everyday things with PDF documents. Keep one in the top drawer of your desktop and use it to:

  • Merge PDF Documents
  • Split PDF Pages into a New Document
  • Decrypt Input as Necessary (Password Required)
  • Encrypt Output as Desired
  • Burst a PDF Document into Single Pages
  • Report on PDF Metrics, including Metadata and Bookmarks
  • Uncompress and Re-Compress Page Streams
  • Repair Corrupted PDF (Where Possible)

Installation

In rpmforge for CentOS

yum install pdftk

RedHat 6 RPM:

sudo yum install libgcj
wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
sudo rpm -i pdftk-2.02-1.*.rpm

Joining Files

pdftk file1.pdf file2.pdf cat output newFile.pdf

Splitting Files

pdftk user_guide.pdf burst

Remove Pages

pdftk myDocument.pdf cat 1-9 26-end output removedPages.pdf

References

keywords