Instance Method


Creates a link to an external resource defined by a URL


func setURL(_ url: URL, for rect: CGRect)



The external URL that the user is directed to on clicking the link.


The region of the current page that becomes the active link area, specified in points in the PDF coordinate space.


Use this method to create links to external resources in the current page of a PDF. The URL is interpreted by the PDF viewer.

To create internal links within the current PDF document, use addDestination(withName:at:) and setDestinationWithName(_:for:).

See Also

Managing Destinations

func addDestination(withName: String, at: CGPoint)

Creates a named destination point in the current PDF page.

func setDestinationWithName(String, for: CGRect)

Creates a link rectangle in the current page that when clicked, will jump the PDF viewer to the named destination.