Bug 695351 - MuPDF does not evaluate page labels
Summary: MuPDF does not evaluate page labels
Status: UNCONFIRMED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: master
Hardware: PC Linux
: P4 enhancement
Assignee: muPDF bugs
QA Contact: Bug traffic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-04 06:13 UTC by Stefan Radermacher
Modified: 2019-09-10 11:18 UTC (History)
4 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Implement page label evaluation in MuPDF (7.56 KB, patch)
2014-07-04 06:13 UTC, Stefan Radermacher
Details | Diff
Updated patch (8.46 KB, patch)
2014-07-06 10:28 UTC, Stefan Radermacher
Details | Diff
Updated patch (9.08 KB, patch)
2014-07-06 15:21 UTC, Stefan Radermacher
Details | Diff
Updated patch (9.11 KB, patch)
2014-07-11 12:33 UTC, Stefan Radermacher
Details | Diff
Here's a diff of what I've done to add support for page labels. (9.11 KB, text/plain)
2015-09-08 13:19 UTC, Albert Bloomfield
Details
Here's a diff of what I've done to add support for page labels. (19.26 KB, patch)
2015-09-09 13:01 UTC, Albert Bloomfield
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Radermacher 2014-07-04 06:13:58 UTC
Created attachment 11043 [details]
Implement page label evaluation in MuPDF

From PDF 1.3 on, pages in a PDF file can have labels that, if present, should be used instead of straight page numbers. MuPDF does not evaluate the PageLabels number tree in which these labels are stored in the PDF file.

I have implemented some code to facilitate this missing feature and updated mupdf-x11 to show the page label along the standard page number. (I have not added this to the various other platform viewers, as I cannot test this.)
Comment 1 Stefan Radermacher 2014-07-04 07:48:06 UTC
Note: I'm fixing up some memory leak problem and C99ism. I'll attach an updated patch later tonight.
Comment 2 Stefan Radermacher 2014-07-06 10:28:15 UTC
Created attachment 11045 [details]
Updated patch

New version of patch to fix memoriy issues and remove some C99isms.
Comment 3 Stefan Radermacher 2014-07-06 15:21:36 UTC
Created attachment 11046 [details]
Updated patch

correct patch file
Comment 4 Stefan Radermacher 2014-07-11 12:33:51 UTC
Created attachment 11054 [details]
Updated patch

Fixed a small bug that could result in all pages having "0" as the label.
Comment 5 Albert Bloomfield 2015-09-04 06:42:31 UTC
Is anyone doing anything with this?  I have fixed the code for this to work with the latest revision of the code.  I would really like an android pdf viewer that supports page labels.  I am still working on fixing it up, but I may have a patch to propose soon.  I would like to know though if there's any chance that it will get integrated.
Comment 6 Robin Watts 2015-09-04 07:58:05 UTC
We will consider all patches, as long as you're prepared to sign the Artifex Copyright Assignment stuff.

We are quite strict on style, and we won't take stuff on unless we feel it's maintainable. It also has to work nicely in a non-platform dependent way.

So, if you feel your code measures up to that, have at it! Thanks.
Comment 7 Stefan Radermacher 2015-09-04 08:01:00 UTC
FYI: When I created the original patch, I signed and sent that agreement and as directed by you made some adjustment to the code to comply with your coding standards.
Comment 8 Albert Bloomfield 2015-09-04 08:02:39 UTC
but it doesn't look like the original patch was ever integrated...
Comment 9 Robin Watts 2015-09-04 08:11:13 UTC
(In reply to Albert Bloomfield from comment #8)
> but it doesn't look like the original patch was ever integrated...

We simply may not have had time yet.
Comment 10 Albert Bloomfield 2015-09-08 13:19:16 UTC
Created attachment 11895 [details]
Here's a diff of what I've done to add support for page labels.
Comment 11 Albert Bloomfield 2015-09-08 13:20:57 UTC
I've been working on it at <https://github.com/asbloomf/mupdf> if anyone wants to look at that, or I uploaded a patch.  I would appreciate any comments or criticisms of the code and if I have time, I will try to clean it up.  But for my purposes, it seems to be working displaying the page labels correctly on Android and Windows.
Comment 12 Albert Bloomfield 2015-09-09 13:01:05 UTC
Created attachment 11897 [details]
Here's a diff of what I've done to add support for page labels.

Somehow I had uploaded the old patch that I had started from.  This is the real one.
Comment 13 Pablo Rodríguez 2017-02-19 08:32:39 UTC
I was about to report that page label aren’t used and I found this issue.

Will the updated patch be implemented or will it be another implementation for page labels?

Many thanks for your help.