Q: how can I change PDF page labels with pdf-tools
?
pdf-tools
has the capacity to annotate PDFs, which is great.
Can it also change the page labels as well? That is, not the
raw page number, but the labeled page number?
Use Case
I scan a lot of books and articles. I would like to be able to jump to the page numbers as enumerated in the books/articles, not just the nominal page number of the PDF.
Example: if I scan an article that ranges from pages 11-20, I want
to be able to embed the pages 11-20 so that I can tell pdf-tools
to jump to, say, page label 12, rather than have to use the
nominal page numbers (in this case, PDF page 2 which would
correspond to page label 12).
What I Found
A quick apropos
search turns up pdf-info-pagelabels
,
pdf-view-current-pagelabel
, and pdf-view-goto-label
. None of
these appear to allow me to edit the page labels.
Alternatives Welcome
In the event that pdf-tools
does not have this capability, I'd
be glad to know of (linux) command line tools that allow me to
edit page labels, as I'm sure I could rig up something with the
right tool.
pdftk input.pdf dump_data
, and adding new metadata,pdftk in.pdf update_info in.info output out.pdf
, so that might be a way to accomplish this. I don't see anything in pdf-tools or the poppler library that it uses that supports this