You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that React-PDF does not aim to be a fully-fledged PDF viewer and is only a tool to make one
I have checked if this feature request is not already reported
Description
I'm working on a PDF viewing tool. One of the features I want to provide is a custom outline.
From pdf.getOutline() I can successfully create a list of both top level and nested items. The thing I can't do is then link those to the specific pages.
Is there, or could there be a method on an OutlineItem that allows looking up the destination to implement custom onClick events.
OutlineItem component exposes onItemClick which provides pre-looked-up properties: { dest, pageIndex, pageNumber } as args. Look at the source code of OutlineItem if you'd like to recreate the tree built by Outline component, along with getting page number/index for each item.
Before you start - checklist
Description
I'm working on a PDF viewing tool. One of the features I want to provide is a custom outline.
From
pdf.getOutline()
I can successfully create a list of both top level and nested items. The thing I can't do is then link those to the specific pages.Is there, or could there be a method on an
OutlineItem
that allows looking up the destination to implement customonClick
events.Proposed solution
Or a longer example:
Alternatives
Alternatively some way to completely customize the
<Outline />
. The current<Outline />
is an all or nothing affair from what I've seen.Additional information
No response
The text was updated successfully, but these errors were encountered: