Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

CGPDFString Reference

Derived from
None
Framework
ApplicationServices/ApplicationServices.h
Companion guide
Declared in
CGPDFString.h

Overview

The CGPDFStringRef opaque type represents a string in a PDF document A PDF string object of a series of bytes—unsigned integer values in the range 0 to 255. The string elements are not integer objects, but are stored in a more compact format. For more information on the representation of strings in PDF, see the latest version of PDF Reference, Adobe Systems Incorporated.

Note that there are no functions for retaining and releasing CGPDFString objects—they exist as constituent parts of a CGPDFDocument object, and are managed by their container.

Functions by Task

Converting PDF Strings

Getting PDF String Data

Functions

CGPDFStringCopyDate

Converts a string to a date.

CFDateRef CGPDFStringCopyDate (
   CGPDFStringRef string
);

Parameters
string

The string to convert to a date.

Return Value

A CFDate object.

Discussion

The PDF specification defines a specific format for strings that represent dates. This function converts strings in that form to CFDate objects.

Availability
Declared In
CGPDFString.h

CGPDFStringCopyTextString

Returns a CFString object that represents a PDF string as a text string.

CFStringRef CGPDFStringCopyTextString (
   CGPDFStringRef string
);

Parameters
string

A PDF string. If this value is NULL, it will cause an error.

Return Value

Returns a CFString object that represents the specified PDF string as a text string. You are responsible for releasing this object.

Availability
Declared In
CGPDFString.h

CGPDFStringGetBytePtr

Returns a pointer to the bytes of a PDF string.

const unsigned char * CGPDFStringGetBytePtr (
   CGPDFStringRef string
);

Parameters
string

A PDF string.

Return Value

Returns a pointer to the bytes of the specified string. If the string is NULL, the function returns NULL.

Availability
Declared In
CGPDFString.h

CGPDFStringGetLength

Returns the number of bytes in a PDF string.

size_t CGPDFStringGetLength (
   CGPDFStringRef string
);

Parameters
string

A PDF string.

Return Value

Returns the number of bytes referenced by the string, or 0 if the string is NULL.

Availability
Declared In
CGPDFString.h

Data Types

CGPDFStringRef

An opaque data type that represents a string in a PDF document.

typedef struct CGPDFString *CGPDFStringRef;

Availability
Declared In
CGPDFString.h

Next Page > Hide TOC


Last updated: 2006-12-22




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice