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

Wrong(?) page label to select page #16

Open
thatsatoffee opened this issue Aug 3, 2017 · 1 comment
Open

Wrong(?) page label to select page #16

thatsatoffee opened this issue Aug 3, 2017 · 1 comment

Comments

@thatsatoffee
Copy link

My PDF file contains pages that are labeled with something other than Arabic numerals. Apart from the usual roman numerals there is also a page at the very beginning simply called "Titel". That is actually a prefix for the page label and according to PDFtk has a NoNumber number style:

PageLabelBegin
PageLabelNewIndex: 1
PageLabelStart: 1
PageLabelPrefix: Titel
PageLabelNumStyle: NoNumber

From the second page on roman numerals are used:

PageLabelBegin
PageLabelNewIndex: 2
PageLabelStart: 2
PageLabelNumStyle: UppercaseRomanNumerals

Now, I can convert the page with label "II" without any problem, but if I call pdf2svg with "Titel" as a page label, I don't get the first page of the document as expected but rather an error:

$ pdf2svg my-doc.pdf /dev/null Titel
Page does not exist

If I replace "Titel" with roman numeral "I", the first page is returned.

That doesn't seem correct to me since roman numerals should only be used from the second page onward in this document. Any ideas?

@juliustayl
Copy link

Do you need to know the actual page label as it is displayed on the pdf page? If you simply just want to be able to get the first or second page in the pdf, where the first page may not actually be labeled as such, then get the pages by index instead of label. I've created a fork of this project that does just that. This may or may not fit your use case.

juliustayl/pdf2svg

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

2 participants