Derived from | None |
Framework | ApplicationServices/ApplicationServices.h |
Companion guide | |
Declared in | CGPDFScanner.h |
The CGPDFScannerRef
opaque type is used to parse a PDF content stream. You can set up the PDF scanner object to invoke callbacks when it encounters specific PDF operators in the stream.
This opaque type is not derived from CFType and therefore there are no functions for retaining and releasing it.
CGPDFScannerPopObject
CGPDFScannerPopBoolean
CGPDFScannerPopInteger
CGPDFScannerPopNumber
CGPDFScannerPopName
CGPDFScannerPopString
CGPDFScannerPopArray
CGPDFScannerPopDictionary
CGPDFScannerPopStream
Creates a CGPDFScanner object.
CGPDFScannerRef CGPDFScannerCreate ( CGPDFContentStreamRef cs, CGPDFOperatorTableRef table, void *info );
A CGPDFContentStream object. (See CGPDFContentStream Reference.)
A CGPDFOperatorTable object that contains callbacks for the PDF operators you want to handle.
A pointer to data you want passed to your CGPDFOperatorTable callback function. (See CGPDFOperatorTable Reference.)
A CGPDFScanner object. You are responsible for releasing this object by calling the function CGPDFScannerRelease
.
When you want to parse the contents of the PDF stream, call the function CGPDFScannerScan
.
CGPDFScanner.h
Returns the content stream associated with a CGPDFScanner object.
CGPDFContentStreamRef CGPDFScannerGetContentStream ( CGPDFScannerRef scanner );
The scanner object whose content stream you want to obtain.
Return the content stream associated with scanner
.
CGPDFScanner.h
Retrieves an array object from the scanner stack.
bool CGPDFScannerPopArray ( CGPDFScannerRef scanner, CGPDFArrayRef *value );
A valid scanner object.
On output, points to the CGPDFArray object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Retrieves a Boolean object from the scanner stack.
bool CGPDFScannerPopBoolean ( CGPDFScannerRef scanner, CGPDFBoolean *value );
A valid scanner object.
On output, points to the CGPDFBoolean object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Retrieves a PDF dictionary object from the scanner stack.
bool CGPDFScannerPopDictionary ( CGPDFScannerRef scanner, CGPDFDictionaryRef *value );
A valid scanner object.
On output, points to the CGPDFDictionary object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Retrieves an integer object from the scanner stack.
bool CGPDFScannerPopInteger ( CGPDFScannerRef scanner, CGPDFInteger *value );
A valid scanner object.
On output, points to the CGPDFInteger object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Retrieves a character string from the scanner stack.
bool CGPDFScannerPopName ( CGPDFScannerRef scanner, const char **value );
A valid scanner object.
On output, points to the character string popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Retrieves a real value object from the scanner stack.
bool CGPDFScannerPopNumber ( CGPDFScannerRef scanner, CGPDFReal *value );
A valid scanner object.
On output, points to the CGPDFReal object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
The number retrieved from the scanner can be a real value or an integer value. However, the result is always converted to a CGPDFReal
data type.
CGPDFScanner.h
Retrieves an object from the scanner stack.
bool CGPDFScannerPopObject ( CGPDFScannerRef scanner, CGPDFObjectRef *value );
A valid scanner object.
On output, points to the object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Retrieves a PDF stream object from the scanner stack.
bool CGPDFScannerPopStream ( CGPDFScannerRef scanner, CGPDFStreamRef *value );
A valid scanner object.
On output, points to the CGPDFStream object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Retrieves a string object from the scanner stack.
bool CGPDFScannerPopString ( CGPDFScannerRef scanner, CGPDFStringRef *value );
A valid scanner object.
On output, points to the CGPDFString object popped from the scanner
stack.
Returns true
if value
is retrieved successfully; false
otherwise.
CGPDFScanner.h
Decrements the retain count of a scanner object.
void CGPDFScannerRelease ( CGPDFScannerRef scanner );
The scanner object to release.
CGPDFScanner.h
Increments the retain count of a scanner object.
CGPDFScannerRef CGPDFScannerRetain ( CGPDFScannerRef scanner );
The scanner object to retain.
The same scanner object passed to the function in the scanner
parameter.
CGPDFScanner.h
Parses the content stream of a CGPDFScanner object.
bool CGPDFScannerScan ( CGPDFScannerRef scanner );
The scanner object whose content stream you want to parse.
Returns true
if the entire stream is parsed successfully; false
if parsing fails (for example, if the stream data is corrupted).
The function CGPDFScannerScan
parses the PDF content stream associated with the scanner. Each time Quartz parses a PDF operator for which you register a callback, Quartz invokes your callback.
CGPDFScanner.h
An opaque type used to parse a PDF content stream.
typedef struct CGPDFScanner *CGPDFScannerRef;
CGPDFScanner.h
© 2004, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-10-15)