Class: URIAction

PSPDFKit.Actions.URIAction

PDF action resolve a uniform resource identifier (web link).

It is an Immutable.Record and thus can be updated using set(key, value), for example: action.set("uri", "https://pspdfkit.com");.

A URI action contains an URI. When executing this annotation, we use window.open to create a new browser tab. We also clear the opener as a security measurement to avoid the target page to have access to your PDF state.

const newWindow = window.open(action.uri, "_blank");
newWindow.opener = null;

Learn more about the security problems when using _blank in this article from JitBit.

Please refer to the individual browser documentations for a lists of supported URI protocols. The most used protocols (http, https and mailto) are supported in all supported browsers.

Constructor

new PSPDFKit.Actions.URIAction(args)

Resolve a uniform resource identifier (web link).

Parameters:
Name Type Description
args object

An object with the uri key used to initialize the action.

Example

Create a new URIAction

const action = new PSPDFKit.Actions.URIAction({ uri: "https://pspdfkit.com" });

Extends

Members




Members

subActions: PSPDFKit.Immutable.List.<Action>

Actions can be chained by adding them to this immutable List.

Type:

uri: string

The uniform resource identifier (web link) that should be resolved when triggering this action.

Type:
  • string