Bug 313177 - regression: post it (annotation) is rotated on pdfs with landscape
Summary: regression: post it (annotation) is rotated on pdfs with landscape
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.15.97
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Fabio D'Urso
URL:
Keywords:
: 314249 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-13 12:42 UTC by suse
Modified: 2013-06-26 20:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0
Sentry Crash Report:


Attachments
wrongly rotated annotation (post it) (39.79 KB, image/png)
2013-01-13 12:43 UTC, suse
Details
Page from a file that displays this issue (49.29 KB, application/pdf)
2013-03-05 23:09 UTC, Fabio D'Urso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description suse 2013-01-13 12:42:09 UTC
I opened a pdf with landscape (not portrait) format.
Than I added the annotation (F6) "post it".
This "post it" is wrongly rotated, see screenshot.

It was working correctly in version  0.14.3. (KDE 4.8.5) 
But already broken in version 0.15.3 (KDE 4.9.3 or/and 4.9.5)

Reproducible: Always
Comment 1 suse 2013-01-13 12:43:19 UTC
Created attachment 76436 [details]
wrongly rotated annotation (post it)
Comment 2 Albert Astals Cid 2013-01-13 22:33:12 UTC
Please attach the pdf file you are using to reproduce the problem.
Comment 3 Fabio D'Urso 2013-01-13 23:17:37 UTC
I see, I've been able to reproduce it with some PDF documents I have (mostly slides), for example: http://www.dmi.unict.it/~fstanco/lezioni_IEM_2007_2008/quarta_parte_colori.pdf

Seems my Poppler rendering code for inline text annotations has some issues with /Rotated pages.
A quick test shows that popup annotations' icon is also affected (it is displayed rotated), and I guess sound and fileattachment icons are affected too, since their code is very similar in Poppler.

Anyway, this is a Poppler bug. I'll have a look tomorrow.
Thank you for reporting :)

@Albert: I'm closing this bug, but I'm not opening a Poppler bug because I plan to fix it myself very soon.
Comment 4 Fabio D'Urso 2013-01-22 22:02:05 UTC
According some other tests I've made some days ago, it's not a Poppler issue only, because Okular will need to be patched too (we'll need to set the FixedRotation flag in new inline text annotations).
Since I'll be a bit busy in the next days and I won't be able to work on it, I'm reopening this bug as a remainder.
Comment 5 Fabio D'Urso 2013-02-01 19:55:57 UTC
*** Bug 314249 has been marked as a duplicate of this bug. ***
Comment 6 Fabio D'Urso 2013-03-05 23:09:12 UTC
Created attachment 77786 [details]
Page from a file that displays this issue

Patches are almost ready. Btw, seems that the file linked in comment #3 has been silently replaced with a new version where this issue doesn't happen. The old version can be found at http://web.archive.org/web/20100928134843/http://www.dmi.unict.it/~fstanco/lezioni_IEM_2007_2008/quarta_parte_colori.pdf
My bad, I should have attached it instead of posting a link. Since that file is too big, I've extracted the first page and I'm attaching it.
Comment 7 Fabio D'Urso 2013-06-26 20:05:59 UTC
Git commit 6efedc7beab3d0ad34b51ac1947acec840564f6f by Fabio D'Urso.
Committed on 26/06/2013 at 19:47.
Pushed by fabiod into branch 'master'.

poppler: Comply with new rules in API calls about FixedRotation annotations

See patch 0006 in
http://lists.freedesktop.org/archives/poppler/2013-April/010214.html

M  +4    -1    generators/poppler/annots.cpp

http://commits.kde.org/okular/6efedc7beab3d0ad34b51ac1947acec840564f6f
Comment 8 Fabio D'Urso 2013-06-26 20:06:01 UTC
Git commit 119cd27c081ecf9a840b1b4778d3f27c85f7ca52 by Fabio D'Urso.
Committed on 26/06/2013 at 19:53.
Pushed by fabiod into branch 'master'.

Set FixedRotation flag on new inline text annotations
FIXED-IN: 4.11.0

M  +1    -0    ui/pageviewannotator.cpp

http://commits.kde.org/okular/119cd27c081ecf9a840b1b4778d3f27c85f7ca52
Comment 9 Fabio D'Urso 2013-06-26 20:29:41 UTC
These patches align new text annotations to the default orientation of the document (same as View -> Orientation -> Original orientation).
Note that only *new* text annotations are affected. Also, poppler 0.24 (not yet released) is required.