Bug 323810

Summary: PDF not rendered correctly
Product: [Applications] okular Reporter: ayr035+kde
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED NOT A BUG    
Severity: major CC: aacid
Priority: NOR    
Version: 0.17.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Okular incorrect page sizes
Incorrect rendering of a page
QPDFView rendering of page (correct rendering)
Sample PDF that exhibits the bug

Description ayr035+kde 2013-08-21 00:09:28 UTC
PDF rendering a specific file is horribly broken.  The file attached to this bug report.
It looks like okular is cropping each page individually so that every page is different size.
This problem just started recently (I think when I upgraded to KDE 4.11).
I've compared how this file renders in Acrobat, mupdf, qpdfview and okular.  Only okular renders the file incorrectly, so it is not a problem with the poppler backend (qpdfview also uses poppler to render PDF).

Reproducible: Always

Steps to Reproduce:
1. Open PDF
If you zoom out so that view is not page width and scroll, you will notice that each page is different.
Actual Results:  
See attached screenshot for okular rendering.

Expected Results:  
See attached screenshot from qpdfview.

Seems to be limited to this specific file.  I've yet to find other examples.
The PDF file in question is output from xelatex. Okular didn't have a problem with it before.
Comment 1 ayr035+kde 2013-08-21 00:09:55 UTC
Created attachment 81824 [details]
Okular incorrect page sizes
Comment 2 ayr035+kde 2013-08-21 00:10:16 UTC
Created attachment 81825 [details]
Incorrect rendering of a page
Comment 3 ayr035+kde 2013-08-21 00:10:49 UTC
Created attachment 81826 [details]
QPDFView rendering of page (correct rendering)
Comment 4 ayr035+kde 2013-08-21 00:13:11 UTC
Created attachment 81827 [details]
Sample PDF that exhibits the bug
Comment 5 Albert Astals Cid 2013-08-21 06:44:04 UTC
Are you using the 'trim margins' feature?
Comment 6 ayr035+kde 2013-08-21 13:58:33 UTC
Trim margins was enabled.  I was not even aware that "Trim Margins" was a feature in Okular.  I have no idea how it got enabled.  I had gone through every setting I could find under the settings menu (I expected to see something under the General tab in Okular Settings).
Comment 7 Albert Astals Cid 2013-08-23 21:28:28 UTC
This is weird, three things:
 * Can you confirm that without trim margins everything looks fine?
 * Are you a "new" user of okular or you've been using it for a long time? We did some settings splitting that may have caused this if you installed okular 4.10 before you installed kdelibs 4.10
 * Can you create a new blank user and see if the option is enabled for you? (I just did it and is not, but let's confirm what happens for you)
Comment 8 Christoph Feck 2013-09-12 12:41:11 UTC
If you can provide the information requested in comment #7, please add it.
Comment 9 ayr035+kde 2013-09-12 22:13:21 UTC
Sorry for the long delay.
* Without trim margins, it looks as expected.
* I use okular pretty exclusively.  No other pdf reader has the speed/features that okular has.
* I just created a new user, it is off by default.

Maybe I just hit the magic key accelerators that turn it on without me being aware (Alt+V > T).  I still don't remember consciously enabling it though.  Anyway, I'm glad it was a simple solution.
Comment 10 Albert Astals Cid 2013-09-21 15:35:58 UTC
Thanks for your research :-)