News for hackers. Stuff that matters.
Re:Borb – A Python library to read, write, and edit PDF files by wodenokoto on Saturday September 18, 2021 @06:33AM (#28575084)
Some books starts counting pages after the table of contents and so the pdf page number and the book page number are not in sync.

I’ve seen some PDFs have the first few pages counted in Roman numerals and then “normal” numbers for the main content.

How do you edit an existing pdf to do that?

Re:Borb – A Python library to read, write, and edit PDF files by shakna on Saturday September 18, 2021 @07:17AM (#28575263)
Page numbers are part of the PageInfo object within a PDF, but it looks like currently this is generated naively [0], so I don't think multiple numbering schemes are currently supported by this library.

[0] https://github.com/jorisschellekens/borb/blob/master/borb/pd...