I keep this in my Scans directory, this is just a backup.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

  1. To merge (concatenate) pdfs:
  2. $ pdftk inputs cat output newfile.pdf
  3. To merge all pdfs:
  4. $ pdftk *.pdf cat output newfile.pdf
  5. To break a pdf into single page files:
  6. $ pdftk input.pdf burst
  7. To combine parts of two or more files, use handles:
  8. $ pdftk A=firstfile.pdf B=secondfile.pdf cat A1-7 B1-5 A8 output newfile.pdf
  9. ========================================================================
  10. To edit metadata is a multistep process:
  11. 1) Dump the pdf metadata:
  12. $ pdftk input.pdf dump_data metadata.txt
  13. 2) Edit the metadata (Geany appears to work), adding:
  14. InfoBegin
  15. InfoKey: Author
  16. InfoValue: Kenneth John Odle
  17. InfoBegin
  18. InfoKey: Title
  19. InfoValue: Journal #42
  20. (For "Title" enter whatever you want to see in the document's title bar as you read it.)
  21. 3) Update the metadata in the pdf file:
  22. $ pdft input.pdf update_info metadata.txt output.pdf
  23. Note that you must write to another file, as pdftk cannot overwrite the original file.
  24. Thus, make the file you save the scan as different than what you want the final file to be named.
  25. See https://sejh.wordpress.com/2014/11/26/changing-pdf-titles-with-pdftk/