Open vindaddo opened 5 years ago
You could do it, but you'd have to write a lot of code, and it would be complicated. However, it is on my roadmap and I expect to do it soon, so if you hold out a little longer, there may be a convenient way to do it in the API. If you want a sneak preview at my current thinking, you can look at the TODO file at the top of the source tree and find the section called "Page splitting/merging". Note that these are just my scratch notes. When I actually implement it, my thinking will likely evolve, and my final solution will probably deviate somewhat from this.
From the CLI, qpdf 8.3.0 and 8.4.0 made some attempt to preserve outlines during page splitting, but I backed it out for 8.4.1 (to be released in the next few days) because it didn't do something reasonable and imposed a heavy performance penalty.
I am beginning work on some features that should make this possible. I'm adding the pages
label. I'll update or reference issues with this label when the feature is working.
This issue is part of the qpdf pages epic. If you are interested in following, please see #1104.
After calling removePage to delete a page from the pdf, I would like to remove any dangling outline entries that point to that page. The manual states:
So according to the manual it should be possible, I just can't find it.