Enhancement request: create pdf page labels ("pagelabels") from image filenames #57

Closed
opened 2021-04-25 19:58:21 +00:00 by josch · 0 comments
Owner

By jaimet on 2019-02-24T18:20:47.355Z

At the moment, if I create a pdf from 3 image files 1.png, 2.png and 4.png, the pdf pages will appear as 1, 2 and 3. Would it be possible to add a switch/option (eg "--pagelabelsfromfilenames") to img2pdf such that if img2pdf is run with this switch, the img2pdf will add pdf "page labels" to the pdf file , and these page labels will be taken from the filenames of the image files, such that the page numbers of the pdf file will appear as 1, 2, and 4.

I have not done much research about how pdf page labels work, but I have found:

https://superuser.com/a/430628 ("How to change internal page numbers in the meta data of a PDF?" on superuser.com)

https://www.w3.org/TR/WCAG20-TECHS/PDF17.html ("Specifying consistent page numbering for PDF documents")

https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf section 12.4.2 ("Page Labels")

(BTW, thank you very much for writing img2pdf)


By jaimet on 2019-02-25T07:30:31.272Z


I've just found https://github.com/lovasoa/pagelabels-py so feel free to close this if you want.


By josch on 2020-04-05T13:20:20.589Z


Yup, it seems that software already does a great job, so no reason to add bloat to img2pdf. Thanks! :)


By josch on 2020-04-05T13:20:20.803Z


Status changed to closed


By josch on 2020-04-13T15:19:20.625Z


Mentioned in issue #71

*By jaimet on 2019-02-24T18:20:47.355Z* At the moment, if I create a pdf from 3 image files 1.png, 2.png and 4.png, the pdf pages will appear as 1, 2 and 3. Would it be possible to add a switch/option (eg "--pagelabelsfromfilenames") to img2pdf such that if img2pdf is run with this switch, the img2pdf will add pdf "page labels" to the pdf file , and these page labels will be taken from the filenames of the image files, such that the page numbers of the pdf file will appear as 1, 2, and 4. I have not done much research about how pdf page labels work, but I have found: https://superuser.com/a/430628 ("How to change internal page numbers in the meta data of a PDF?" on superuser.com) https://www.w3.org/TR/WCAG20-TECHS/PDF17.html ("Specifying consistent page numbering for PDF documents") https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf section 12.4.2 ("Page Labels") (BTW, thank you very much for writing img2pdf) --- *By jaimet on 2019-02-25T07:30:31.272Z* --- I've just found https://github.com/lovasoa/pagelabels-py so feel free to close this if you want. --- *By josch on 2020-04-05T13:20:20.589Z* --- Yup, it seems that software already does a great job, so no reason to add bloat to img2pdf. Thanks! :) --- *By josch on 2020-04-05T13:20:20.803Z* --- Status changed to closed --- *By josch on 2020-04-13T15:19:20.625Z* --- Mentioned in issue #71
josch closed this issue 2021-04-25 19:58:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#57
No description provided.