|
| 1 | +# rotate |
| 2 | + |
| 3 | +## Usage |
| 4 | + |
| 5 | +``` |
| 6 | +pdfly rotate --help |
| 7 | +
|
| 8 | + Usage: pdfly rotate [OPTIONS] FILENAME DEGREES [PGRGS] |
| 9 | +
|
| 10 | + Rotate specified pages by the specified amount |
| 11 | +
|
| 12 | + Example: |
| 13 | + pdfly rotate --output output.pdf input.pdf 90 |
| 14 | + Rotate all pages by 90 degrees (clockwise) |
| 15 | +
|
| 16 | + A file not followed by a page range (PGRGS) means all the pages of the file. |
| 17 | +
|
| 18 | + PAGE RANGES are like Python slices. |
| 19 | +
|
| 20 | + Remember, page indices start with zero. |
| 21 | +
|
| 22 | + Page range expression examples: |
| 23 | +
|
| 24 | + : all pages. -1 last page. |
| 25 | + 22 just the 23rd page. :-1 all but the last page. |
| 26 | + 0:3 the first three pages. -2 second-to-last page. |
| 27 | + :3 the first three pages. -2: last two pages. |
| 28 | + 5: from the sixth page onward. -3:-1 third & second to last. |
| 29 | +
|
| 30 | + The third, "stride" or "step" number is also recognized. |
| 31 | +
|
| 32 | + ::2 0 2 4 ... to the end. 3:0:-1 3 2 1 but not 0. |
| 33 | + 1:10:2 1 3 5 7 9 2::-1 2 1 0. |
| 34 | + ::-1 all pages in reverse order. |
| 35 | +
|
| 36 | +╭─ Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ |
| 37 | +│ * filename FILE [required] │ |
| 38 | +│ * degrees INTEGER degrees to rotate [required] │ |
| 39 | +│ pgrgs [PGRGS] page range [default: :] │ |
| 40 | +╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ |
| 41 | +╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ |
| 42 | +│ * --output -o PATH [required] │ |
| 43 | +│ --help Show this message and exit. │ |
| 44 | +╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ |
| 45 | +``` |
| 46 | + |
| 47 | +## Examples |
| 48 | + |
| 49 | +### Rotate all pages by 90 degrees (clockwise) |
| 50 | + |
| 51 | +Rotate all pages from `input.pdf` by 90 degrees (clockwise) and write the resulting pdf to `output.pdf`. |
| 52 | + |
| 53 | +``` |
| 54 | +pdfly rotate --output output.pdf input.pdf 90 |
| 55 | +``` |
| 56 | + |
| 57 | +### Rotate first three pages by 90 degrees (clockwise) |
| 58 | + |
| 59 | +Rotate first three pages from `input.pdf` by 90 degrees (clockwise) and write the resulting pdf to `output.pdf`. |
| 60 | + |
| 61 | +``` |
| 62 | +pdfly rotate --output output.pdf input.pdf 90 :3 |
| 63 | +``` |
| 64 | + |
| 65 | +### Rotate last page by 90 degrees (clockwise) |
| 66 | + |
| 67 | +Rotate last page from `input.pdf` by 90 degrees (clockwise) and write the resulting pdf to `output.pdf`. |
| 68 | + |
| 69 | +``` |
| 70 | +pdfly rotate --output output.pdf input.pdf 90 -- -1 |
| 71 | +``` |
0 commit comments