I have a multi-page pdf file, and I want to rotate a specific page 90 degrees clockwise, to obtain a new pdf file which has the same pages as the original pdf, but with this specific page rotated. How can I do this?
NOTE: This solution only works for Ubuntu versions up through 17.10. Ubuntu 18.04 and later do not have the
pdftkpackage due to the packages being removed due to the dependencies to run the package being removed from the Archive for Bionic and later.
NOTE2: even if officially removed from 18.04, there is a snap version of
pdftk; you can install it with
snap install pdftk.
You can use
pdftk. Install it with
sudo apt-get install pdftk. Then, suppose you want to rotate the page 4 of your document
test.pdf 90 degree clockwise:
pdftk test.pdf cat 1-3 4east 5-end output out.pdf
You can do much more in
pdftk, changing page order, rotation, merging various PDF files. The manual page is your friend here.
man pdftk, referring to the
<input PDF handle>[<begin page number>[-<end page num‐ ber>[<qualifier>]]][<page rotation>]
Where the handle identifies one of the input PDF files, and the beginning and ending page numbers are one-based refer‐ ences to pages in the PDF file. The qualifier can be even or odd, and the page rotation can be north, south, east, west, left, right, or down.
You can also use
pdfshuffler, which has a GUI interface. You can download it from http://sourceforge.net/projects/pdfshuffler/ or using ubuntu software centre or synaptic package manager.
It allows to do exactly what you want, you can graphically choose which pages to rotate, if more than one page is wanted. You can also do cropping and reordering of the pages.
This is also possible through a website like http://online-pdf.org, I think you need to upload the file twice, in one you select the page you like to rotate, and in the other you select the rest. You're selections should be merged after this.
I have very good experience with PDF arranger. It is my preferred GUI tool. You can reorder, rotate, delete, insert pages using this application by mouse, save only selected pages, view page thumbnails (and much more). You can install it using:
sudo apt-get install pdfarranger