Bug 426430 - Typewriter annotation doesn't use corrected page orientation
Summary: Typewriter annotation doesn't use corrected page orientation
Status: RESOLVED NOT A BUG
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.11.0
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-12 00:17 UTC by skierpage
Modified: 2020-09-12 17:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skierpage 2020-09-12 00:17:13 UTC
SUMMARY
I needed to annotate a PDF with some text, but the PDF had been scanned sideways. So I used View > Orientation > Rotate Right to fix its orientation, then F6 > T to add my text annotation. But Okular also rotated this new annotation, so it appeared sideways.

STEPS TO REPRODUCE
1. Open a PDF in Okular (this bug will be clearer if it was scanned sideways hence has wrong orientation).
2. Choose View > Orientation > Rotate Right (or Left) to correct its orientation.
3. Now use the Typewriter tool (F6 > T) to enter a text annotation.

OBSERVED RESULT
Okular places the text annotation upright on the page according to its _original_ orientation, meaning that it is rotated relative to the page with the corrected orientation.

EXPECTED RESULT
If you've corrected the page orientation, Okular should place text upright according to the current _corrected_ orientation, not the original page.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0 (xcb)

ADDITIONAL INFORMATION
This occurs in Fedora 32's packaged Okular 1.9.3, and I reproduced in the kdeapps flatpak, version 1.11.70.

I tried saving the PDF with corrected orientation as a new PDF, opening the new PDF in okular, and then annotating that, and it didn't help, okular "remembered" the original orientation.

https://github.com/mozilla/pdf.js/issues/7631#issuecomment-247857666 talks about annotations, rotations, a NoRotate flag in PDF, this might be relevant.
Comment 1 Laura David Hurka 2020-09-12 11:15:25 UTC
Indeed, Okular does not know about rotation for text and for annotations. Stamp annotations have the same problem.

I don’t know whether this is possible in PDF, your link doesn’t really make me smarter.
Comment 2 Albert Astals Cid 2020-09-12 17:16:32 UTC
This is not a bug.

I think your expectation is that Rotating rotates the document, but it does not, it just rotates the view, so obviously the annotation you add is also rotated.

You should actually use some tool to rotate your document if it's broken.