File: pdftk.1.html

package info (click to toggle)
pdftk 1.12-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,960 kB
  • ctags: 7,497
  • sloc: java: 47,941; cpp: 3,923; makefile: 235
file content (1020 lines) | stat: -rw-r--r-- 39,049 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta name="Content-Style" content="text/css">
<title>PDFTK</title>
</head>
<body>

<h1 align=center>PDFTK</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#NOTES">NOTES</a><br>
<a href="#AUTHOR">AUTHOR</a><br>

<hr>
<!-- Creator     : groff version 1.17.2 -->
<!-- CreationDate: Tue Oct 26 16:34:13 2004 -->
<a name="NAME"></a>
<h2>NAME</h2>
<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
pdftk - A handy tool for manipulating PDF</td></table>
<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>pdftk</b> <i>&lt;input PDF files | - | PROMPT&gt;</i><br>
[<b>input_pw</b> <i>&lt;input PDF owner passwords |
PROMPT&gt;</i>]<br>
[<i>&lt;operation&gt; &lt;operation arguments&gt;</i>]<br>
[<b>output</b> <i>&lt;output filename | - |
PROMPT&gt;</i>]<br>
[<b>encrypt_40bit</b> | <b>encrypt_128bit</b>]<br>
[<b>allow</b> <i>&lt;permissions&gt;</i>]<br>
[<b>owner_pw</b> <i>&lt;owner password | PROMPT&gt;</i>]<br>
[<b>user_pw</b> <i>&lt;user password | PROMPT&gt;</i>]<br>
[<b>flatten</b>] [<b>compress</b> | <b>uncompress</b>]<br>
[<b>verbose</b>] [<b>dont_ask</b> | <b>do_ask</b>]<br>
Where:<i><br>
&lt;operation&gt;</i> may be empty, or:<br>
[<b>cat</b> | <b>attach_files</b> | <b>unpack_files</b> |
<b>burst</b> |<b><br>
fill_form</b> | <b>background</b> |<b><br>
dump_data</b> | <b>dump_data_fields</b> |
<b>update_info</b>]</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
For Complete Help: <b>pdftk --help</b></td></table>
<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
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. Use it to:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
* Merge PDF Documents<br>
* Split PDF Pages into a New Document<br>
* Decrypt Input as Necessary (Password Required)<br>
* Encrypt Output as Desired<br>
* Fill PDF Forms with FDF Data and/or Flatten Forms<br>
* Apply a Background Watermark<br>
* Report PDF Metrics such as Metadata and Bookmarks<br>
* Update PDF Metadata<br>
* Attach Files to PDF Pages or the PDF Document<br>
* Unpack PDF Attachments<br>
* Burst a PDF Document into Single Pages<br>
* Uncompress and Re-Compress Page Streams<br>
* Repair Corrupted PDF (Where Possible)</td></table>
<a name="OPTIONS"></a>
<h2>OPTIONS</h2>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
A summary of options is included below.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>--help</b>, <b>-h</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Show summary of options.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>&lt;input PDF files | - | PROMPT&gt;</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
A list of the input PDF files. If you plan to combine these
PDFs (without using handles) then list files in the order
you want them combined. Use <b>-</b> to pass a single PDF
into pdftk via stdin. Input files can be associated with
handles, where a handle is a single, upper-case
letter:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<i>&lt;input PDF handle&gt;</i><b>=</b><i>&lt;input PDF
filename&gt;</i></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Handles are often omitted. They are useful when specifying
PDF passwords or page ranges, later.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
For example: A=input1.pdf B=input2.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[input_pw &lt;input PDF owner passwords |
PROMPT&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Input PDF owner passwords, if necessary, are associated with
files by using their handles:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<i>&lt;input PDF handle&gt;</i><b>=</b><i>&lt;input PDF file
owner password&gt;</i></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
If handles are not given, then passwords are associated with
input files by order.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Most pdftk features require that encrypted input PDF are
accompanied by the ~owner~ password. If the input PDF has no
owner password, then the user password must be given,
instead. If the input PDF has no passwords, then no password
should be given.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
When running in <b>do_ask</b> mode, pdftk will prompt you
for a password if the supplied password is incorrect or none
was given.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[&lt;operation&gt; &lt;operation
arguments&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
If this optional argument is omitted, then pdftk runs in
'filter' mode. Filter mode takes only one PDF input and
creates a new PDF after applying all of the output options,
like encryption and compression.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Available operations are: <b>cat</b>, <b>attach_files</b>,
<b>unpack_files</b>, <b>burst</b>, <b>fill_form</b>,
<b>background</b>, <b>dump_data</b>,
<b>dump_data_fields</b>, <b>update_info</b>. Some operations
takes additional arguments, described below.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>cat [&lt;page ranges&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Catenates pages from input PDFs to create a new PDF. Page
order in the new PDF is specified by the order of the given
page ranges. Page ranges are described like
this:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
<i>&lt;input PDF handle&gt;</i>[<i>&lt;begin page
number&gt;</i>[<b>-</b><i>&lt;end page
number&gt;</i>[<i>&lt;qualifier&gt;</i>]]]</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Where the handle identifies one of the input PDF files, and
the beginning and ending page numbers are one-based
references to pages in the PDF file, and the qualifier can
be <b>even</b> or <b>odd</b>.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
If the handle is omitted from the page range, then the pages
are taken from the first input PDF.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
If no arguments are passed to cat, then pdftk combines all
input PDFs in the order they were given to create the
output.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
<b>NOTES:</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
* <i>&lt;end page number&gt;</i> may be less than
<i>&lt;begin page number&gt;</i>.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
* The keyword <b>end</b> may be used to reference the final
page of a document instead of a page number.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
* Reference a single page by omitting the ending page
number.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
* The handle may be used alone to represent the entire PDF
document, e.g., B1-end is the same as B.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
<b>Page range examples:</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
A1-21</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Bend-1odd</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
A72</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
A1-21 Beven A72</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>attach_files &lt;attachment filenames | PROMPT&gt;
[to_page &lt;page number | PROMPT&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Packs arbitrary files into a PDF using PDF's file attachment
features. More than one attachment may be listed after
<b>attach_files</b>. Attachments are added at the document
level unless the optional <b>to_page</b> option is given, in
which case the files are attached to the given page number
(the first page is 1, the final page is <b>end</b>). For
example:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk in.pdf attach_files table1.html table2.html to_page 6
output out.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>unpack_files</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Copies all of the attachments from the input PDF into the
current folder or to an output directory given after
<b>output</b>. For example:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk report.pdf unpack_files output ~/atts/</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
or, interactively:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk report.pdf unpack_files output PROMPT</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>burst</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Splits a single, input PDF document into individual pages.
Also creates a report named <b>doc_data.txt</b> which is the
same as the output from <b>dump_data</b>. If the
<b>output</b> section is omitted, then PDF pages are named:
pg_%04d.pdf, e.g.: pg_0001.pdf, pg_0002.pdf, etc. To name
these pages yourself, supply a printf-styled format string
via the <b>output</b> section. For example, if you want
pages named: page_01.pdf, page_02.pdf, etc., pass <b>output
page_%02d.pdf</b> to pdftk. Encryption can be applied to the
output by appending output options such as <b>owner_pw</b>,
e.g.:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk in.pdf burst owner_pw foopass</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>fill_form &lt;FDF data filename | - |
PROMPT&gt;</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Fills the single input PDF's form fields with the data from
an FDF file or stdin. Enter the FDF data filename after
<b>fill_form</b>, or use <b>-</b> to pass the data via
stdin, like so:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk form.pdf fill_form data.fdf output
form.filled.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
After filling a form, the form fields remain interactive
unless you also use the <b>flatten</b> output option.
<b>flatten</b> merges the form fields with the PDF pages.
You can use <b>flatten</b> alone, too, but only on a single
PDF:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk form.pdf fill_form data.fdf output out.pdf
flatten</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
or:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk form.filled.pdf output out.pdf flatten</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
If the input FDF file includes Rich Text formatted data in
addition to plain text, then the Rich Text data is packed
into the form fields <i>as well as</i> the plain text. Pdftk
also sets a flag that cues Acrobat/Reader to generate new
field appearances based on the Rich Text data. That way,
when the user opens the PDF, the viewer will create the Rich
Text fields on the spot. If the user's PDF viewer does not
support Rich Text, then the user will see the plain text
data instead. If you flatten this form before Acrobat has a
chance to create (and save) new field appearances, then the
plain text field data is what you'll see.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>background &lt;background PDF filename | - |
PROMPT&gt;</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Applies a PDF watermark to the background of a single input
PDF. Pass the background PDF's filename after
<b>background</b> like so:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk in.pdf background back.pdf output out.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Pdftk uses only the first page from the background PDF and
applies it to every page of the input PDF. This page is
scaled and rotated as needed to fit the input page. You can
use <b>-</b> to pass a background PDF into pdftk via stdin.
For backward compatibility with pdftk 1.0, <b>background</b>
can be used as an output option. However, this old technique
works only when no operation is given.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>dump_data</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Reads a single, input PDF file and reports various
statistics, metadata, bookmarks (a/k/a outlines), and page
labels to the given output filename or (if no output is
given) to stdout. Does not create a new PDF.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>dump_data_fields</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Reads a single, input PDF file and reports form field
statistics to the given output filename or (if no output is
given) to stdout. Does not create a new PDF.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="15%"></td><td width="85%">
<b>update_info &lt;info data filename | - |
PROMPT&gt;</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
Changes the metadata stored in a single PDF's Info
dictionary to match the input data file. The input data file
uses the same syntax as the output from <b>dump_data</b>.
This does not change the metadata stored in the PDF's XMP
stream, if it has one. For example:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="26%"></td><td width="74%">
pdftk in.pdf update_info in.info output out.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[output &lt;output filename | - |
PROMPT&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
The output PDF filename may not be set to the name of an
input filename. Use <b>-</b> to output to stdout. When using
the <b>dump_data</b> operation, use <b>output</b> to set the
name of the output data file. When using the
<b>unpack_files</b> operation, use <b>output</b> to set the
name of an output directory. When using the <b>burst</b>
operation, you can use <b>output</b> to control the
resulting PDF page filenames (described above).</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[encrypt_40bit | encrypt_128bit]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
If an output PDF user or owner password is given, output PDF
encryption strength defaults to 128 bits. This can be
overridden by specifying encrypt_40bit.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[allow &lt;permissions&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Permissions are applied to the output PDF only if an
encryption strength is specified or an owner or user
password is given. If permissions are not specified, they
default to 'none,' which means all of the following features
are disabled.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
The <b>permissions</b> section may include one or more of
the following features:</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>Printing</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td><td width="68%">
Top Quality Printing</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>DegradedPrinting</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td><td width="68%">
Lower Quality Printing</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>ModifyContents</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td><td width="68%">
Also allows Assembly</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>Assembly</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>CopyContents</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td><td width="68%">
Also allows ScreenReaders</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>ScreenReaders</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>ModifyAnnotations</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td><td width="68%">
Also allows FillIn</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>FillIn</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
<b>AllFeatures</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="32%"></td><td width="68%">
Allows the user to perform all of the above, and top quality
printing.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[owner_pw &lt;owner password |
PROMPT&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[user_pw &lt;user password | PROMPT&gt;]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
If an encryption strength is given but no passwords are
supplied, then the owner and user passwords remain empty,
which means that the resulting PDF may be opened and its
security parameters altered by anybody.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[compress | uncompress]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
These are only useful when you want to edit PDF code in a
text editor like vim or emacs. Remove PDF page stream
compression by applying the <b>uncompress</b> filter. Use
the <b>compress</b> filter to restore
compression.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[flatten]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Use this option to merge an input PDF's interactive form
fields (and their data) with the PDF's pages. Only one input
PDF may be given. Sometimes used with the <b>fill_form</b>
operation.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[verbose]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
By default, pdftk runs quietly. Append <b>verbose</b> to the
end and it will speak up.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>[dont_ask | do_ask]</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
Depending on the compile-time settings (see
ASK_ABOUT_WARNINGS), pdftk might prompt you for further
input when it encounters a problem, such as a bad password.
Override this default behavior by adding <b>dont_ask</b> (so
pdftk won't ask you what to do) or <b>do_ask</b> (so pdftk
will ask you what to do).</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="21%"></td><td width="79%">
When running in <b>dont_ask</b> mode, pdftk will over-write
files with its output without notice.</td></table>
<a name="EXAMPLES"></a>
<h2>EXAMPLES</h2>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Decrypt a PDF</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk secured.pdf input_pw foopass output
unsecured.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Encrypt a PDF using 128-bit strength (the default),
withhold all permissions (the default)</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk 1.pdf output 1.128.pdf owner_pw foopass</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Same as above, except password 'baz' must also be used to
open output PDF</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw
baz</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Same as above, except printing is allowed (once the PDF
is open)</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz allow
printing</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Join in1.pdf and in2.pdf into a new PDF,
out1.pdf</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk in1.pdf in2.pdf cat output out1.pdf<br>
or (using handles):<br>
pdftk A=in1.pdf B=in2.pdf cat A B output out1.pdf<br>
or (using wildcards):<br>
pdftk *.pdf cat output combined.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Remove 'page 13' from in1.pdf to create
out1.pdf</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk in.pdf cat 1-12 14-end output out1.pdf<br>
or:<br>
pdftk A=in1.pdf cat A1-12 A14-end output
out1.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Apply 40-bit encryption to output, revoking all
permissions (the default). Set the owner PW to
'foopass'.</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk 1.pdf 2.pdf cat output 3.pdf encrypt_40bit owner_pw
foopass</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Join two files, one of which requires the password
'foopass'. The output is not encrypted.</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk A=secured.pdf 2.pdf input_pw A=foopass cat output
3.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Uncompress PDF page streams for editing the PDF in a text
editor (e.g., vim, emacs)</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk doc.pdf output doc.unc.pdf uncompress</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Repair a PDF's corrupted XREF table and stream lengths,
if possible</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk broken.pdf output fixed.pdf</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Burst a single PDF document into pages and dump its data
to doc_data.txt</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk mydoc.pdf burst</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Burst a single PDF document into encrypted pages. Allow
low-quality printing</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk mydoc.pdf burst owner_pw foopass allow
DegradedPrinting</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
<b>Write a report on PDF document metadata and bookmarks to
report.txt</b></td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="13%"></td><td width="87%">
pdftk mydoc.pdf dump_data output report.txt</td></table>
<a name="NOTES"></a>
<h2>NOTES</h2>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
pdftk uses a slightly modified iText Java library
(http://itextpdf.sourceforge.net/) to read and write PDF.
The author compiled this Java library using GCJ
(http://gcc.gnu.org) so it could be linked with a front end
written in C++.</td></table>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
The pdftk home page is
http://www.accesspdf.com/pdftk/.</td></table>
<a name="AUTHOR"></a>
<h2>AUTHOR</h2>

<table width="100%" border=0 rules="none" frame="void"
       cols="2" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="10%"></td><td width="90%">
Sid Steward (ssteward@accesspdf.com) maintains
pdftk.</td></table>
<hr>
</body>
</html>