Bug 188239 - [JJ] Okular doesn't follow PageLayout TwoColumnLeft and TwoColumnRight
Summary: [JJ] Okular doesn't follow PageLayout TwoColumnLeft and TwoColumnRight
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.8.1
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2009-03-27 11:13 UTC by Frédéric COIFFIER
Modified: 2024-08-19 22:36 UTC (History)
7 users (show)

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


Attachments
TwoColumnLeft layout example (69.92 KB, application/octet-stream)
2013-03-11 12:48 UTC, Frédéric COIFFIER
Details
TwoColumnRight layout example (70.26 KB, application/octet-stream)
2013-03-11 12:48 UTC, Frédéric COIFFIER
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric COIFFIER 2009-03-27 11:13:56 UTC
Version:           Okular 0.8.1 (using KDE 4.2.1)
Compiler:          gcc (Gentoo 4.3.3-r1 p1.1, pie-10.1.5) 4.3.3
 
OS:                Linux
Installed from:    Gentoo Packages

For some PDF eBooks, the Catalog section contains a PageLayout field which contain TwoColumnLeft or TwoColumnRight.

PageLayout (Optional) A name object specifying the page layout to be used when the document is opened:
SinglePage : Display one page at a time.
OneColumn : Display the pages in one column.
TwoColumnLeft : Display the pages in two columns, with odd-
numbered pages on the left.
TwoColumnRight : Display the pages in two columns, with odd-
numbered pages on the right.

(See implementation note 19 in Appendix H.) Default value: SinglePage.

This option is used in PDFs generated by OpenOffice.
Comment 1 Pino Toscano 2009-03-27 11:29:43 UTC
Never claimed we would follow them, so this is more a wish.
Comment 2 Frédéric COIFFIER 2009-11-16 10:15:43 UTC
The current version of Okular seems to be 0.9.3.
Do you plan to implement this feature in near future ? (But, I agree this implementation isn't critic, but just for comfort with some PDF files)
Comment 3 Albert Astals Cid 2013-03-10 20:30:51 UTC
Can you please attach a file with such feature so we can test?
Comment 4 Frédéric COIFFIER 2013-03-11 12:48:24 UTC
Created attachment 77951 [details]
TwoColumnLeft layout example
Comment 5 Frédéric COIFFIER 2013-03-11 12:48:57 UTC
Created attachment 77952 [details]
TwoColumnRight layout example
Comment 6 Frédéric COIFFIER 2013-03-11 12:49:42 UTC
These two files can be tested with Adobe Reader.
Comment 7 Albert Astals Cid 2013-03-11 18:48:47 UTC
Thanks :-)
Comment 8 William Entriken 2014-12-15 17:46:26 UTC
I am confirming this issue for Okular 0.19.2. Also noting that Apple's Preview.app does correctly display each file when View -> Two Pages is selected.
Comment 9 William Entriken 2014-12-15 18:05:30 UTC
Here is some more information:

I think this is the related file for loading PDFs

https://projects.kde.org/projects/kde/kdegraphics/okular/repository/revisions/master/entry/generators/poppler/generator_pdf.cpp

And here is the API reference for Poppler which shows that the Document / PageLayout field can be read by the library.

I think the solution to this issue will to be to edit generator_pdf above in the function Okular::DocumentInfo PDFGenerator::generateDocumentInfo( const QSet<Okular::DocumentInfo::Key> &keys ) const
Comment 10 sahil 2015-03-16 17:15:16 UTC
The Two Column left is working for me,
Click on view menu-> view mode -> facing pages.
I am not able to find the two column right option.
Is there any specific button naming odd pages left or right for these 2 options?
Comment 11 Albert Astals Cid 2015-03-16 21:02:14 UTC
sahil this has nothing to do with what you say, please read the bug again, it clearly specifies this is about a PDF file specifiying how it should be shown, not the user changing anything
Comment 12 Denis Bitouzé 2019-01-14 12:31:51 UTC
I am confirming this issue for Okular 1.3.2, at least for TwoPageRight value of PageLayout. I guess it is useless to open a new bug report since hte current one is about okular not following (any) PageLayout PDF specification.
Comment 13 Bug Janitor Service 2024-08-09 13:31:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/1039
Comment 14 Albert Astals Cid 2024-08-19 22:36:41 UTC
Git commit 036b037d8ceb521213293ea6765c62037b0616e1 by Albert Astals Cid, on behalf of Athul Raj Kollareth.
Committed on 19/08/2024 at 22:36.
Pushed by aacid into branch 'master'.

Support pdf Default Page Layout

Allow pdf to specify default view mode.

M  +22   -0    core/document.cpp
M  +6    -0    core/document_p.h
M  +10   -0    core/generator.cpp
M  +26   -0    core/generator.h
M  +38   -0    generators/poppler/generator_pdf.cpp
M  +2    -0    generators/poppler/generator_pdf.h

https://invent.kde.org/graphics/okular/-/commit/036b037d8ceb521213293ea6765c62037b0616e1