Ubuntu: How to “save” a rotated pdf file



Question:

I have a pdf file shown upside down. So I use Okular to rotate it and it looks good. The problem is, The next time I open it with other software, it's still upside down. If I open it with Okular, it is not.

I am wondering what's happening underhood.

  • I do have write permission on that file.
  • I tried "save a copy to", but no effect. Actually, there is no save operation needed to be done. The file seems not even been modified after I rotate in Okular.


Solution:1

According to the man page for pdftk, one of the operations is rotate and you can save the rotated file:

The page rotation setting can cause pdftk to rotate pages and
documents. Each option sets the page rotation as follows (in
degrees): north: 0, east: 90, south: 180, west: 270, left:
-90, right: +90, down: +180. left, right, and down make
relative adjustments to a page's rotation.

However, pdftk is quite powerful and it's better that you read the man pages and use pdftk --help to meet your exact needs.

If you want to take a look at man pdftk without installing it, here's a link for 13.10: http://manpages.ubuntu.com/manpages/saucy/en/man1/pdftk.1.html


Solution:2

Another great and tiny program for this is PDF-Shuffler.

merge or split pdf documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface

Installation

You can install it from the software center, or through the command-line:

sudo apt-get install pdfshuffler  

Screenshot

0.6.0 on Linux Mint 17.2 Rafaela

Rotate a page

  1. open a PDF (click the + button) ;
  2. select the page you want to rotate ;
  3. click the rotate icon ↺ or ↻ (or use the menu) ;

Rotate several pages

If you want to rotate all pages, click on one, then press Ctrl+a to select all.

Or you can select as many as you want individually by holding down Ctrl as you select.


Solution:3

To clarify, this is what you use to rotate 180 degrees:

  pdftk   input.pdf cat 1-endsouth output output.pdf  # ^^^^^   ^^^^^^^^^ ^^^ ^^^^^^^^^^ ^^^^^^ ^^^^^^^^^^  #        input file     range  |          output file  # command                    direction  

Where direction can be any of these:

  • north
  • south
  • east
  • west
  • left
  • right
  • down


Solution:4

Okular and other PDF viewers like Evince (part of GNOME) or Atril (part of the MATE desktop) rotate only the view of the PDF and when saving, the changes are kept in the Application settings but the PDF itself is not rotated.

There are other Desktop applications like pdf-shuffler and pdfmod and command line tools like pdftk that allow you to do what you want.


Solution:5

There's also PDF Mod. Looks to be very similar to pdfshuffler, but I've never used pdfshuffler. I've been using PDF Mod for years.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »