5

I just installed Ubuntu for the first time and I'm getting used to using it. I'm playing around with PDF documents. I have problems with rotation of pages using default document browser Evince document viewer.

I got two files: First 'original.pdf' file with wrongly rotated pages. Second. 'modified.pdf' file with pages rotation corrected by me.

I deleted orginal.pdf and renamed modified.pdf -> original.pdf.

Before I renamed modified.pdf ,page rotation was good. When I renamed it to original.pdf pages are being rotated wrongly. All this thing for the same file I'm only renaming it. I can cancel 'wrong rotation' by renaming 'original.pdf' to any other name. Quite strange... Of course if I open the original.pdf file with another browser pages are rotated properly.

My guess is that Evince document viewer remember rotation setting from time when I was playing with original.pdf file and is applying this rotation rules to any file named orignal.pdf even if I delete the file and rename another file to original.pdf. Sth like rule rotate pages in orignal.pdf always by 90 degree clockwise`.

Is my guess about this rotation is good? Is there a way to delete this history of rotation or deactivate it completely? I would like to see always files as they are, keep it real.

Thank you in advance for help!

2 Answers 2

5

Congrats on starting your adventure with Ubuntu. You'll be hooked in no time! My answer uses shell commands, which on a *nix OS is a good thing to become familiar with. You can access the shell by pressing the key combination CtrlAltT. The shell/terminal will pop up; then you can cd to the file location, e.g. if it's in your Documents directory, type cd ~/Documents. You can type ls to make sure your pdf is there.

You are correct, this is very typical of a document viewer to make the rotation a display property. In order to truly rotate the pdf, try using

pdftk temp.pdf cat 1-endR output tempR.pdf

which means, given a file temp.pdf, rotate 90° pages 1 to the end of the document and write out to the file tempR.pdf.

For details, see man pdftk and search for rotation, e.g.:

 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.
5
  • 1
    tniles09 thank you for your answer. Unfortunately I don't have problem with rotating pages. In detail I wrote python script to do page rotating for me. I have more complicated cases where each odd number is rotated 90d clockwise and every even page is rotated -90d clockwise. But I have problem when I'm looking at results of my work. When I'm using Evince document viewer I don't see real layout of the document instead of this I'm looking at 'saved perferences' in terms of page rotation (at least I think so).
    – michalk
    Dec 15, 2015 at 0:22
  • Have you tried looking at the file in a web browser? e.g. in a firefox url bar type file:///home/userName/Desktop/temp.pdf (of course substitute the path for your file).
    – tniles
    Dec 15, 2015 at 0:29
  • I'm thinking if it looks correct in the browser's viewer (as long as it's not also evince), this may be a good indication that evince has a cache somewhere and is remembering your rotation preferences (I think this is what you're getting after). Alternatively, the ubuntu software center has some other programs available for viewing pdf files (search 'pdf viewer').
    – tniles
    Dec 15, 2015 at 0:32
  • I just found a bug for evince on this topic, but it's pretty old (2011), so unless you're using a very old ubuntu/evince it's probably not the same issue. How does the file look in other viewers? (e.g. firefox, okular, mupdf)
    – tniles
    Dec 15, 2015 at 0:40
  • Odder viewers are good. But I was thinking maybe I just miss some settings to deactivate page cache rotation. So if there are no simple solution then I will uninstall Evince and find a new pdf viewer. tniles09: thank you for support!
    – michalk
    Dec 15, 2015 at 1:03
0

I had a problem with the Xreader and the document rotation. It took a few tries to remember what I did to change the rotation since there were no menu items to put it back. I used ctrl right arrow to move the highlight to the right. It moved the rotation.

Solution: CTRL + Right Arrow

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .