64
22.6 PDFmanipulationtools
[user_pw <user password | PROMPT>]
[flatten] [compress | uncompress]
[keep_first_id | keep_final_id] [drop_xfa]
[verbose] [dont_ask | do_ask]
Where:
<operation> may be empty, or:
[cat | attach_files | unpack_files | burst |
fill_form | background | stamp | generate_fdf
dump_data | dump_data_fields | update_info]
Ashortdescriptionoftheoptionsfollows.
<input PDF files | - | PROMPT>
List of theinput PDF files. If no handles aredefinedthe files should be listed in theorder that
theyhaveto be combined. AsinglePDFfilecanbe readfromstandard input(specify
-
as first
argumentto
pdftk
ifyouwantthis).
# The files f1.pdf, f2.pdf and f3.pdf are merged into f123.pdf
pdftk f1.pdf f2.pdf f3.pdf cat output f123.pdf
Inputfilescanbeassociatedwithhandles,consistingofasingle,upper-caseletter,e.g.,
# Using handles for merging files
pdftk F=f1.pdf G=f2.pdf cat F G output f12.pdf
HandlesareespeciallyusefulwhenspecifyingPDFpasswordsorpageranges.
[input_pw <input PDF owner passwords | PROMPT>]
InputPDFownerpasswords,ifneeded,areassociatedwithfilesbytheirhandles:
<input PDF handle>=<input PDF file owner password>
# Using handles to specify passwords
pdftk A=a.pdf B=b.pdf input_pw A=apw B=bpw cat A B output ab.pdf
# Join two files, the 1st file has a password, the output has none
pdftk A=secure.pdf b.pdf input_pw A=secret cat output both.pdf
Whithouthandlespasswordsareassociatedwithinputfilesbyorder.
[<operation> <operation arguments>]
Withoutthisoptionalargument
pdftk
runs in“filter”mode, whichtakesonlyonePDFfileasin-
put and creates a new PDF fileaer applyingallof theoutput options, such as encryption and
compression.
eavailableoperationsaredescribednext.
cat [<page ranges>]
Concatenates pages fromtheinput PDF files to createa new PDF file, with its page order
specifiedbytheorderofthegivenpageranges.Pagerangeshavethefollowingformat:
<input PDF handle>[<begin page>[-<end page[even|odd]]][<page rota-
tion>]
ehandleidentifiesoneoftheinputPDFfiles,andthebeginningandendingpagenumbers
areone-basedreferencestopagesinthePDFfile.epagerotationcanbe
N
,
S
,
E
,
W
,
L
,
R
,or
D
.
ch-psextra2.tex,v:2.27
2007/08/13
157