Bug forwarded from Evince: https://bugzilla.gnome.org/show_bug.cgi?id=628597 "The Story: I had a pdf-image, that was rotated using pdftk. This image was included in a pdflatex run as embedded image. The resulting pdf is correctly displayed in Adobe Reader, but within Evince, this image is unrotated (off be 90°)... Unfortunately I cannot give the example, but I'll try to come up with a test-file within a few days... For now, my analysis of the pdf shows that there is the following sequence within the pdf: 12 0 obj << /Type /XObject /Subtype /Form /FormType 1 /PTEX.FileName (C:/the/path/to/rotated_picture.pdf) /PTEX.PageNumber 1 /PTEX.InfoDict 28 0 R /Matrix [0 -1 1 0 0 596.25] /BBox [0 0 596.25 843] /Group 13 0 R /Resources << /ExtGState << /s5 29 0 R ..... My guess would be that Evince does not correctly parse the /Matrix for the XObject, as the Matrix 0 -1 1 0 would correspond to the missing rotation... Best regards, Chewi" Test case is attached to the original bug report. I confirm it works with splash.
This issue is still reproducable with poppler 0.16.0, see this Ubuntu bug report for another example: https://bugs.launchpad.net/ubuntu/+source/evince/+bug/711300
Indeed, we are ignoring the TransformationMatrix from the state in CairoOutputDev::BeginTransparencyGroup. Caching the state->getCTM() into a cairo_matrix_t and then calling cairo_set_matrix with this matrix at the begining of CairoOutputDev::PaintTransparencyGroup works when scale = 1 but (not surprisingly) does not scale properly when rendering at bigger scales.
Created attachment 55629 [details] [review] fix ctm when painting groups Patch to fix. Similar to the set soft mask bugs we need to store the current ctm during beginTransparencyGroup when the group is created and use this ctm when painting the group.
*** Bug 40596 has been marked as a duplicate of this bug. ***
Comment on attachment 55629 [details] [review] fix ctm when painting groups Review of attachment 55629 [details] [review]: ----------------------------------------------------------------- Patch looks good to me and it doesn't introduce regressions in my tests, so please, push it to both branches. Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.