Created
June 20, 2023 11:22
-
-
Save stefanschmidt/63fdd9f86a35f14d86c02cc321b59ca7 to your computer and use it in GitHub Desktop.
Fix logical page numbering of a PDF document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cover (1 page) | |
# table of contents (14 pages) | |
# result: C1,i,ii,...,xiv,1,2,... | |
pip install pagelabels | |
python -m pagelabels --delete doc.pdf | |
python -m pagelabels --startpage 1 --prefix C doc.pdf | |
python -m pagelabels --startpage 2 --type 'roman lowercase' doc.pdf | |
python -m pagelabels --startpage 16 --type arabic doc.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment