Outlines/Bookmarks with No Action

WebViewer Version: 8.10.0

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Sorta - a document with some of these null action bookmarks has them stripped when uploaded to one of your demos.
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? No

Please give a brief summary of your issue:
Cannot display outline items without a destination and/or bookmarks with null action throw errors

Please describe your issue and provide steps to reproduce it:
We’re migrating from a different vendor solution to Apryse (using WebViewer in Angular and the SDK in our .NET backend). Our users have an existing workflow of putting “Informational” outline items on documents, e.g. using them to tag a large document with an easy-to-see piece of data like the document subject’s DOB. They then expect these to show up at a certain place in the Outline view.

When we initially implemented this, we could get the items to display on the WebViewer Outline, but clicking on the item threw undefined errors which broke the document’s rendering. After some adjustment that I am not 100% privy to, we now no longer display the items unless we assign them an action, such as a GoTo. Ideally, we don’t want these items to have a GoTo, we’d rather that clicking on them does nothing - no errors and no action.

So, what is the proper way to create an Outline item/bookmark such that it displays but when clicked does nothing?

Please provide a link to a minimal sample where the issue is reproducible: TBD, may be able to create one

1 Like


I am not sure what code you are using to create the actions, but you can try any of the other actions found here: Apryse WebViewer Class: Action.

In my local environment, I tested with the following code and with the URI action set to #:

const doc = docViewer.getDocument();
const pdfDoc = await doc.getPDFDoc();

const myitem = await PDFNet.Bookmark.create(pdfDoc, 'My outline');
await myitem.setAction(await PDFNet.Action.createURI(pdfDoc, '#'));
await pdfDoc.addRootBookmark(myitem);

After downloading the document and opening it with our viewing sample, I tried out the bookmark. It seems to give an error in the console, but it seems harmless and does not seem to break anything with rendering.

Let me know if that works for you!


Work around for us. Our real user monitor (RUM - Dynatrace) reports this as errors and generate alerts, but we added a rule to ignore. It would be ideal not have to do this in order to get outlines to show in the webviewer. Outlines with no actions display in all other major viewers (adobe, edge, chrome).

1 Like