Questions tagged [pdftk]

pdftk (PDF ToolKit) is a multiplatform open source tool for manipulating PDF documents.

80 questions
65
votes
11 answers

Merge two PDF files containing even and odd pages of a book

I have two searchable PDF documents, say even.pdf and odd.pdf which contain even and odd pages of a book, respectively. I can decompile each PDF to separate files 001.pdf 002.pdf 003.pdf, et cetera. The question is how to merge them? They are both…
Yurij73
  • 1,100
65
votes
10 answers

How to merge multiple PDF files onto one page with pdftk?

I have a range of PDF files 1.pdf, 2.pdf, etc. that I would like to merge into one file, with all the PDFs tiled on one page. Currently, I have tried pdftk to merge these files, but they are put on separate pages: pdftk 1.pdf 2.pdf ... cat output…
50
votes
4 answers

How to remove watermark from pdf using pdftk?

I need to remove some stupid email watermark that expands across all pages of a public domain book. I looked at pdftk man page and some examples but still can not figure out how to remove the watermarks. I appreciate your hints.
hnns
  • 1,115
37
votes
1 answer

Use Ghostscript, but tell it to not reprocess images?

I have a PDF that has already compressed and somewhat artifact-y images, and I'm using Ghostscript to prepend a title page to that PDF. However, I cannot find any way to tell GS to just use the existing images as-is without reprocessing them, and…
17
votes
8 answers

Remove text from pdf

I have a pdf file with some text on each page which I would like to remove. The text is matched by a regex and I think it comes in one block of the pdf. I have used pdfedit to select and delete the text with the GUI but I was looking for a way to do…
DrYap
  • 271
16
votes
1 answer

pdftk: multiple page ranges

I want to grab a few pages from a large (600+ pgs) document using pdftk. How can I do this? example: suppose the pages I need are 300, 307-310, and 315-318 from a file named "bloated.pdf". This doesn't seem to work: pdftk A=bloated.pdf cat…
Jason S
  • 7,944
14
votes
8 answers

How do I duplicate pages within PDF files automatically?

I have a lot of PDF files with 1 to 4 pages each. I need a solution which automatically generates a new file for each of these files. The new files should contain the content of the original files twice (i.e. pages 1 through to the end, followed by…
Marc
  • 181
12
votes
4 answers

Merge two pdf files side by side in command line

I have got two pdf files with same number of pages and want compare each page with the corresponding page in the other file. For this I would like to merge say page 1 of File1.pdf with page 1 of File2.pdf so it gets one page in the new document.…
nnn
  • 241
10
votes
1 answer

How to add text at bottom of pages using pdftk?

I am wondering ho to put a link text at the bottom of all pages of a pdf file using pdftk. Appreciate your help.
hnns
  • 1,115
7
votes
2 answers

No output from pdftk

I am trying to add a background to a PDF with pdftk: $ pdftk ./sources/Skills.pdf background ./Background.pdf output test.pdf verbose Command Line Data is valid. Input PDF Filenames & Passwords in Order ( [, ] ) …
Matteo
  • 8,097
  • 3
  • 47
  • 58
7
votes
1 answer

Multiple operations with pdftk

I am using pdftk to perform some operations on PDFs. Right now I am doing it like this: pdftk OPERATION output - | \ pdftk - OPERATION output - | \ ... pdftk - OPERATION output final.pdf So…
masgo
  • 2,324
7
votes
1 answer

pdftk flatten loses fillable field data

I'm trying to work out a solution to flatten PDFs with already-filled out fields on a Linux command line. I was messing around with GhostScript at first, but I found that tended to convert all the field data to garbage characters. When I run this…
6
votes
0 answers

How to extract all info on PDF bookmarks using GhostScript?

Is there a method of dumping all info on the bookmarks of a PDF using GhostScript? With PDFtk I could use pdftk in.pdf dump_data, but is it possible to do it with GS? I have a PDF with bookmarks where pdftk reports all bookmarks having…
6
votes
3 answers

How can I append two PDFs that have links

My problem I have two PDFs which I would like to merge to one PDF. The first one was generated with LaTeX and has links to the chapters, the second one is a GUI-draft with links created with Balsamiq. How can I append the GUI draft to the LaTeX…
Martin Thoma
  • 3,604
  • 10
  • 36
  • 65
6
votes
1 answer

Why is pdftk no longer available on Cygwin?

pdtfk is often considered the go-to non-proprietary tool for serious transformations of PDF files, and as such it used to be available from the Cygwin package repository, but I can't find it anymore. Is there a reason for this?
Hashim Aziz
  • 13,835
1
2 3 4 5 6