CGPDFScanner

A parser object for handling content and operators in a PDF content stream.

Overview

You can set up the PDF scanner object to invoke callbacks when it encounters specific PDF operators in the stream.

This object is not derived from CFType. Use CGPDFScannerRetain(_:) and CGPDFScannerRelease(_:) to manage the retain count of CGPDFScannerRef instances; do not use CFRetain and CFRelease.

Topics

Retaining and Releasing PDF Scanner Objects

func CGPDFScannerRetain(CGPDFScannerRef) -> CGPDFScannerRef

Increments the retain count of a scanner object.

func CGPDFScannerRelease(CGPDFScannerRef)

Decrements the retain count of a scanner object.

Parsing Content

func CGPDFScannerScan(CGPDFScannerRef) -> Bool

Parses the content stream of a PDF scanner object.

func CGPDFScannerGetContentStream(CGPDFScannerRef) -> CGPDFContentStreamRef

Returns the content stream associated with a PDF scanner object.

Data Types

typealias CGPDFScannerRef

A type used to parse a PDF content stream.

See Also

Abstract Types for PDF Document Content

CGPDFPage

A page in a PDF document.

CGPDFArray

An array structure within a PDF document.

CGPDFObject

An object representing content within a PDF document.

CGPDFStream

A stream or sequence of data bytes in a PDF document.

CGPDFString

A text string in a PDF document.

CGPDFDictionary

A dictionary structure within a PDF document.

CGPDFContentStream

A representation of one or more content data streams in a PDF page.

CGPDFOperatorTable

A set of callback functions for operators used when scanning content in a PDF document.