Carbon


PMSessionSetPSInjectionData

Header: PMCore.h Carbon status: Under Evaluation

Specifies a set of PostScript code injection points and the associated data.

OSStatus PMSessionSetPSInjectionData (
    PMPrintSession printSession, 
    PMPrintSettings printSettings, 
    CFArrayRef injectionDictArray
);
Parameter descriptions
printSession

A PMPrintSession object.

printSettings

A PMPrintSettings object.

injectionDictArray

A CFArray object containing one or more CFDictionary entries. Each CFDictionary specifies injection data to be inserted at a specific point in the print stream. See “PostScript Injection Dictionary Keys” for a description of the constants you can use to create these dictionary entries.

function result

A result code. A result code. See “Result Codes”. The result code kPMInvalidParameter is returned if the injectionDictArray object contains any invalid entries. The result code kPMInvalidPrintSession is returned if the document format has not been set to kPMDocumentFormatPICTPS for the specified print session.

DISCUSSION

For applications that require extensive control over PostScript code generation, this function provides the ability to insert PostScript code into specified places in the print stream. It is intended for use by desktop publishing applications for which functions such as PMSessionPostScriptData do not provide sufficient control.

You specify the injection points by creating an array of CFDictionary entries. Each dictionary consists of a key value and its associated data. The function will verify that the injectionDictArray parameter is properly formed, and return the kPMInvalidParameter result code if the array does not contain valid dictionaries with the required keys.

Before calling PMSessionSetPSInjectionData, your application must set the document format of the print session to kPMDocumentFormatPICTPS using the PMSessionSetDocumentFormatGeneration function.

Calling PMSessionSetPSInjectionData a second time for a given print settings object replaces any injection points that may have been previously specified.

SPECIAL CONSIDERATIONS

Valid between calls to PMSessionBeginDocument and PMSessionEndDocument.

AVAILABILITY

Under evaluation for Carbon. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)