pdftk (PDF ToolKit) is a multiplatform open source tool for manipulating PDF documents.
Questions tagged [pdftk]
74 questions
58
votes
10 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,030
- 3
- 13
- 18
54
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…
Alex Reynolds
- 811
- 1
- 9
- 21
44
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,005
- 5
- 15
- 21
36
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…
Mahmoud Al-Qudsi
- 3,766
- 4
- 35
- 39
17
votes
5 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
- 1
- 2
- 4
13
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
- 171
- 1
- 1
- 5
13
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,503
- 16
- 60
- 79
9
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
- 211
- 1
- 2
- 6
9
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,005
- 5
- 15
- 21
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
- 7,717
- 2
- 42
- 57
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,194
- 1
- 16
- 32
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…
user2752467
- 490
- 2
- 8
- 17
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…
Joel Peltonen
- 213
- 1
- 10
5
votes
2 answers
Remove PDF margins and print 2 pages per side
I print out a lot of pdf articles, and I'd like to use less paper by printing 2 pages per side. But due to the large margins---both from the original pdf file and added by the printing process---the text is very small when I print 2 pages per side.…
Jeff
- 271
- 1
- 3
- 9
5
votes
1 answer
How can I stamp every page of a pdf except the first one?
I have two PDF files; one is a document and the other is a single page containing a graphic. So far I have been using pdftk to stamp the graphic onto the document like so:
pdftk document.pdf stamp graphic.pdf output.pdf
It has worked fine. However…
Benjamin Confino
- 157
- 1
- 1
- 5