Mac Developer Library

Developer

ApplicationServices Framework Reference CGPDFStream Reference

Options
Deployment Target:

On This Page
Language:

CGPDFStream Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import CoreGraphics

Objective-C

@import CoreGraphics;

The CGPDFStreamRef opaque type represents a PDF stream. A PDF stream consists of a dictionary that describes a sequence of bytes. Streams typically represent objects with potentially large amounts of data, such as images and page descriptions.

This opaque type is not derived from CFType and therefore there are no functions for retaining and releasing it.

Functions

  • Returns the data associated with a PDF stream.

    Declaration

    Swift

    func CGPDFStreamCopyData(_ stream: CGPDFStreamRef, _ format: UnsafeMutablePointer<CGPDFDataFormat>) -> Unmanaged<CFData>!

    Objective-C

    CFDataRef CGPDFStreamCopyData ( CGPDFStreamRef stream, CGPDFDataFormat *format );

    Parameters

    stream

    A PDF stream.

    format

    On return, contains a constant that specifies the format of the data returned—CGPDFDataFormatRaw, CGPDFDataFormatJPEGEncoded, or CGPDFDataFormatJPEG2000.

    Return Value

    A CFData object that contains a copy of the stream data. You are responsible for releasing this object.

    Import Statement

    Objective-C

    @import CoreGraphics;

    Swift

    import CoreGraphics

    Availability

    Available in OS X version 10.3 and later.

  • Returns the dictionary associated with a PDF stream.

    Declaration

    Swift

    func CGPDFStreamGetDictionary(_ stream: CGPDFStreamRef) -> CGPDFDictionaryRef

    Objective-C

    CGPDFDictionaryRef CGPDFStreamGetDictionary ( CGPDFStreamRef stream );

    Parameters

    stream

    A PDF stream.

    Return Value

    The PDF dictionary for the specified stream.

    Import Statement

    Objective-C

    @import CoreGraphics;

    Swift

    import CoreGraphics

    Availability

    Available in OS X version 10.3 and later.

Data Types

  • An opaque type that represents a PDF stream.

    Declaration

    Swift

    typealias CGPDFStreamRef = COpaquePointer

    Objective-C

    typedef struct CGPDFStream *CGPDFStreamRef;

    Import Statement

    Objective-C

    @import CoreGraphics;

    Swift

    import CoreGraphics

    Availability

    Available in OS X v10.3 and later.

Constants

  • The encoding format of PDF data.

    Declaration

    Swift

    struct CGPDFDataFormat { init(_ value: UInt32) var value: UInt32 }

    Objective-C

    enum CGPDFDataFormat { CGPDFDataFormatRaw, CGPDFDataFormatJPEGEncoded, CGPDFDataFormatJPEG2000 }; typedef enum CGPDFDataFormat CGPDFDataFormat;

    Constants

    • CGPDFDataFormatRaw

      CGPDFDataFormatRaw

      The data stream is not encoded.

      Available in OS X v10.3 and later.

    • CGPDFDataFormatJPEGEncoded

      CGPDFDataFormatJPEGEncoded

      The data stream is encoded in JPEG format.

      Available in OS X v10.3 and later.

    • CGPDFDataFormatJPEG2000

      CGPDFDataFormatJPEG2000

      The data stream is encoded in JPEG-2000 format.

      Available in OS X v10.4 and later.

    Import Statement

    Objective-C

    @import CoreGraphics;

    Swift

    import CoreGraphics

    Availability

    Available in OS X version 10.3 and later.