Add notes on pdftk for PDF manipulation

- Included basic commands for common PDF tasks using pdftk
- Added instructions for:
  - Merging PDFs
  - Appending one PDF to another
  - Cutting specific pages from a PDF
  - Splitting PDFs into individual pages
  - Rotating PDF pages
  - Encrypting PDFs with a password

This commit provides essential pdftk commands for managing and manipulating PDF files.
This commit is contained in:
Fabrice Quenneville 2024-09-23 16:53:44 -04:00
parent c66d6a3213
commit 3d175495c9

57
notes/pdftk.md Normal file
View File

@ -0,0 +1,57 @@
# pdftk
## Table of Contents
- [pdftk](#pdftk)
- [Table of Contents](#table-of-contents)
- [Basic Commands](#basic-commands)
## Basic Commands
**Merge PDFs**
To merge two PDFs, use:
```
pdftk file1.pdf file2.pdf cat output merged.pdf
```
**Append PDF**
To append one PDF to another, use:
```
pdftk A=first.pdf B=second.pdf cat A B output combined.pdf
```
**Cut pages from PDF**
To only keep the first page:
```
pdftk file1.pdf cat 1-1 output output.pdf
```
**Split PDF**
To split a PDF into single pages, use:
```
pdftk input.pdf burst output page_%02d.pdf
```
**Rotate PDF Pages**
To rotate pages in a PDF, use:
```
pdftk input.pdf cat 1-endsouth output rotated.pdf
```
**Encrypt PDF**
To encrypt a PDF with a password, use:
```
pdftk input.pdf output encrypted.pdf user_pw yourpassword
```