pdftk_notes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pdftk_notes [2021/05/06 20:44] – raju | pdftk_notes [2024/02/15 04:34] (current) – [replace a page with another pdf] raju | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | ==== extract some pages ==== | ||
+ | To get pages 11-19 (inclusive on both sides) of a pdf file | ||
+ | pdftk A=in.pdf cat A11-19 output out.pdf | ||
+ | |||
+ | Tested using | ||
+ | < | ||
+ | % pdftk --version | ||
+ | pdftk port to java 3.3.2 a Handy Tool for Manipulating PDF Documents | ||
+ | </ | ||
+ | |||
+ | ==== replace a page with another pdf ==== | ||
+ | To replace pg-16 of a pdf with another pdf. Assume that the later consists of only one single page. | ||
+ | |||
+ | < | ||
+ | pdftk A=initial.pdf B=insertAsPg16.pdf cat A1-15 B1 A17-end output final.pdf | ||
+ | </ | ||
+ | |||
+ | Tested using | ||
+ | |||
+ | < | ||
+ | % pdftk --version | ||
+ | |||
+ | pdftk 2.01 a Handy Tool for Manipulating PDF Documents | ||
+ | Copyright (C) 2003-13, Sid Steward - Please Visit: www.pdftk.com | ||
+ | This is free software; see the source code for copying conditions. There is | ||
+ | NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
+ | </ | ||
+ | |||
+ | ==== rotate pages by 180 degrees ==== | ||
+ | < | ||
+ | pdftk in.pdf cat 1-endsouth output out.pdf | ||
+ | </ | ||
+ | |||
+ | Ref:- https:// | ||
+ | |||
==== store a pdf without password ==== | ==== store a pdf without password ==== | ||
+ | tags | remove password pdf | ||
+ | |||
< | < | ||
- | qpdf --password=YOURPASSWORD-HERE --decrypt input.pdf output.pdf | + | qpdf --password=YOURPASSWORD --decrypt input.pdf output.pdf |
+ | </ | ||
+ | If the password has some special characters, quote it. | ||
+ | < | ||
+ | qpdf --password=" | ||
+ | </ | ||
+ | |||
+ | < | ||
pdftk secured.pdf input_pw YOURPASSWORD output unsecured.pdf | pdftk secured.pdf input_pw YOURPASSWORD output unsecured.pdf | ||
</ | </ | ||
Line 9: | Line 55: | ||
Ref:- https:// | Ref:- https:// | ||
+ | |||
+ | ==== encrypt a pdf with password ==== | ||
+ | < | ||
+ | pdftk in.pdf output out.pdf user_pw foo | ||
+ | </ | ||
+ | |||
+ | Ref:- http:// | ||
+ | |||
+ | Note:- I was unable to encrypt a pdf file using Adobe Reader X1 Version 11.0.13 . I could not find the "Tools pane" described in < | ||
==== make two copies of the same document ==== | ==== make two copies of the same document ==== | ||
Line 16: | Line 71: | ||
See also: https:// | See also: https:// | ||
+ | |||
+ | ==== debian package ==== | ||
+ | * pdftk-java | ||
+ | |||
+ | ==== external links ==== | ||
+ | * Enricon Zini talks about using pdfk and inkscape to add signatures to pdf documents - http:// | ||
pdftk_notes.1620333857.txt.gz · Last modified: 2021/05/06 20:44 by raju