Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect page numbering #353

Closed
kaba2 opened this issue Nov 10, 2015 · 4 comments
Closed

Incorrect page numbering #353

kaba2 opened this issue Nov 10, 2015 · 4 comments

Comments

@kaba2
Copy link

kaba2 commented Nov 10, 2015

In this PDF:

http://tempsend.com/B02B4B4675

SumatraPDF 3.1.1 shows the logical page numbers as 1 (1/3), 1.1 (2/3), 2 (3/3). Acrobat Reader and Foxit Reader show 1,1,2, which is correct in this case. The bug is present in the latest portable version.

More information:

http://tex.stackexchange.com/questions/276925/strange-page-numbering-with-onesided-book-and-hyperref-package

@ousia
Copy link

ousia commented Nov 10, 2015

@kaba2, I can confirm the bug: logical page 2 is numbered as having label 1.1 with latest unstable version. Evince displays this page label as 1.

The issue persists also in the latest pre-released version (sorry if you meant that with the latest portable binary).

@kjk
Copy link
Member

kjk commented Nov 10, 2015

bug.pdf

@ousia
Copy link

ousia commented Jul 27, 2017

@kjk,

I attach an already uncompressed PDF (wrong-pagelabels.pdf).

Its dictionary reads:

  /PageLabels <<
    /Nums [ 0 <<
          /S /D
          /St 1
        >> 1 <<
          /S /D
          /St 1
        >> 2 <<
          /S /D
          /St 1
        >> 3 <<
          /S /D
          /St 1
        >> 4 <<
          /S /D
          /St 1
        >> 5 <<
          /S /D
          /St 1
        >> ]
  >>

Pages in that document are to be labeled: 1 to 6 with 1 and 7 to 10 with 2 to 5.

SumatraPDF seems to read non-existing information in the /PageLabels dictionary.

Extra-labels may be specified by the /P key, such as in the modified dictionary:

  /PageLabels <<
    /Nums [ 0 <<
          /S /D
          /St 1
        >> 1 <<
          /S /D
          /St 1
        >> 2 <<
          /S /D
          /St 1
        >> 3 <<
          /S /D
          /P (1.)
          /St 1
        >> 4 <<
          /S /D
          /P (1.)
          /St 1
        >> 5 <<
          /S /D
          /St 1
        >> ]
  >>

The uncompressed output (real-pagelabels.pdf) has the following page label sequence:

1
1
1
1.1
1.1
1
2
3
4
5

SumatraPDF reads the previously modified dictionary as:

1
1.2
1.3
1.1
1.1.1
1.4
2
3
4
5

Could you fix this issue?

Many thanks for your help.

@kjk
Copy link
Member

kjk commented Nov 23, 2019

For future reference: relevant code is BuildPageLabelVec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants