Replies: 1 comment
-
The general case needs to solve the halting problem since actions can run arbitrary Javascript code which could include changing pages. We could get most of the other cases though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a function available that will return the page number for bookmarks?
All I've managed to put together is this:
page_number = Page(outline_item.action["/D"][0]).index
which only works in a specific scenario.
There appears to be several ways that an OutlineItem could eventually resolve to a page, eg
destination (pikepdf.objects.Array | pikepdf.objects.String | pikepdf.objects.Name | int | None)
page_location (PageLocation | str | None)
action (pikepdf.objects.Dictionary | None)
It would be nice to have a robust function that will return the page number no matter how a particular pdf document structures its' OutlineItems.
Beta Was this translation helpful? Give feedback.
All reactions