iOS Guides | Samples

CoreGraphics.CGContextPDF Class

PDF Rendering CGContext class. Use this class to create a CGContext that will output the results to a PDF file.

See Also: CGContextPDF

Syntax

public class CGContextPDF : CGContext

Remarks

You can use all of the regular CGContext methods, the result, instead of being rendered into the screen or an image, the commands are turned into PDF commands and stored in a PDF file.

Requirements

Namespace: CoreGraphics
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of CoreGraphics.CGContextPDF are listed below.

See Also: CGContext

Public Constructors

Creates a new CGContext that records its commands into a PDF file with the mediaBox dimensions stored in the specified url.
Creates a new CGContext that records its commands into a PDF file in the specified url.
Creates a new CGContext that records its commands into a PDF file with the mediaBox dimensions stored in the specified url.
Creates a PDF context that renders its contents into the specified dataConsumer object.
Creates a new CGContext that records its commands into a PDF file with the mediaBox dimensions stored in the specified url.

Public Methods

AddDestination(String, CGPoint)
Adds a destination name at the specified location.
AddDocumentMetadata(NSData)
BeginPage(CGPDFPageInfo)
Close()
EndPage()
SetDestination(String, CGRect)
If the user clicks or taps in the specified region, the PDF viewer will jump to the named destination
SetUrl(NSUrl, CGRect)
Associates a region in the screen with a url. When the user clicks or taps in that region, he will be redirected to that url on their PDF viewer.

Protected Methods

override
Dispose(Boolean)
Releases the resources used by the CGContextPDF object.