Function

UIGraphicsSetPDFContextURLForRect

Links a rectangle on the current page to the specified URL.

Declaration

void UIGraphicsSetPDFContextURLForRect(NSURL *url, CGRect rect);

Parameters

url

The URL to open.

rect

A rectangle on the current page of the PDF context.

Discussion

You use this function to create external links within a PDF document. If the URL you specify is a type handled by a different application, tapping the rectangle opens that application.

If the current graphics context is not a PDF context, this function does nothing.

See Also

PDF Creation

UIGraphicsBeginPDFContextToData

Creates a PDF-based graphics context that targets the specified mutable data object.

UIGraphicsBeginPDFContextToFile

Creates a PDF-based graphics context that targets a file at the specified path.

UIGraphicsEndPDFContext

Closes a PDF graphics context and pops it from the current context stack.

UIGraphicsBeginPDFPage

Marks the beginning of a new page in a PDF context and configures it using default values.

UIGraphicsBeginPDFPageWithInfo

Marks the beginning of a new page in a PDF context and configures it using the specified values.

UIGraphicsGetPDFContextBounds

Returns the current page bounds.

UIGraphicsAddPDFContextDestinationAtPoint

Creates a jump destination in the current page.

UIGraphicsSetPDFContextDestinationForRect

Links a rectangle on the current page to the specified jump destination.