Bug 438923 - PDF contents tab doesn't respect empty page label number style
Summary: PDF contents tab doesn't respect empty page label number style
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 21.04.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-19 18:10 UTC by Dani Pozo
Modified: 2021-07-28 20:37 UTC (History)
3 users (show)

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


Attachments
Example PDF (2.22 MB, application/pdf)
2021-06-19 21:59 UTC, Dani Pozo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Pozo 2021-06-19 18:10:39 UTC
SUMMARY
PDF contents tab doesn't respect empty page label number style

STEPS TO REPRODUCE
1. Take a PDF with empty page label number style,
which is common for the cover.
2. Open Okular, press F7 and open the Contents tab.

OBSERVED RESULT

The cover page number is displayed as 1.

EXPECTED RESULT

The cover page number is displayed as empty.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.82.0-1
(available in About System)
KDE Plasma Version: 5.82.0-1
KDE Frameworks Version: 5.82.0-1
Qt Version: 5.15

ADDITIONAL INFORMATION

None
Comment 1 Albert Astals Cid 2021-06-19 19:36:52 UTC
Can you attach a PDF file in which you expect this to happen?
Comment 2 Laura David Hurka 2021-06-19 21:18:49 UTC
The Contents view needs to show something as page number. I guess, since the PDF does not provide a page label, it shows the number of the page.

Should we somehow deemphasize the number, to avoid confusion? If the PDF provides page labels for not all pages. The number could then be in brackets: (1) or in a desaturated font?
Comment 3 Dani Pozo 2021-06-19 21:59:53 UTC
Created attachment 139526 [details]
Example PDF
Comment 4 Dani Pozo 2021-06-19 22:14:22 UTC
(In reply to David Hurka from comment #2)
> The Contents view needs to show something as page number. I guess, since the
> PDF does not provide a page label, it shows the number of the page.

Does it need to show something always? As far as I can understand, for the case
in which the book page doesn't have a number, but it has a bookmark entry,
you can leave the page label style empty. Evince, for instance, shows no number or letter in the tab analogous to the Contents tab.

> Should we somehow deemphasize the number, to avoid confusion? If the PDF
> provides page labels for not all pages. The number could then be in
> brackets: (1) or in a desaturated font?

As I'm not sure whether this Evince behaviour would break some other PDFs,
this could be an option too. I have been reading a bit on the PDF standard (http://www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf),
and from Table 159 (page 375) I understand that the labels should be empty in
this case. This is an opinion supported only from looking briefly at the
standard, may easily be wrong.

(In reply to Albert Astals Cid from comment #1)
> Can you attach a PDF file in which you expect this to happen?

Sure, please see the attached PDF. The first two pages have no page label
style.
Comment 5 Laura David Hurka 2021-06-20 12:31:33 UTC
The page number is relevant, because it is also needed for “Print pages from ... to ...”. But since the page widget in the main toolbar also shows the page number, the Contents panel probably may show nothing as well.

I am not sure what is best. Showing the page label even when it is defined to be empty (i. e. show nothing) may be the best option, and the one most straightforward and least confusing.
Comment 6 Albert Astals Cid 2021-06-20 16:18:20 UTC
yeah i guess we can show nothing
Comment 7 Oliver Sander 2021-06-20 18:57:31 UTC
I wouldn't mind seeing both, the number and the page label (empty if there is no label).  If there is a general consensus against showing the page number, then showing nothing at all if there is no page label is okay for me, too.
Comment 8 Dani Pozo 2021-06-20 18:59:58 UTC
(In reply to Oliver Sander from comment #7)
> I wouldn't mind seeing both, the number and the page label (empty if there
> is no label).

They are different things after all, so this can make the most sense in my opinion.