
Adobe Acrobat SDK
Working with Acrobat Extended APIs
Developing Plug-ins and Applications
AcroColor extended API 243
●
The data element to pass to the progress monitor callback. You can pass
NULL
if you do not want to
provide a progress monitor callback.
●
A
PDColorConvertReportProc
object that represents the reporting callback. You can pass
0
to
indicate that there is no reporting callback.
●
The data element to pass to the reporting callback. You can pass
NULL
if you do not want to provide
a reporting callback.
●
The address of an
ASBool
variable. If a conversion is made to the specified page,
true
is assigned.
The following code example converts a page in a PDF document to Apple RGB.
Example 20.6
Converting a page in a PDF document to Apple RGB
//Define the color parameters
PDColorConvertParams myColorParams;
//Define the color actions
PDColorConvertAction myAction;
//Declare an AC_Profile object
AC_Profile prof;
//Define AppleRGB as the profile to use
ACProfileFromCode(&prof, AC_Profile_AppleRGB);
//Declare a PDColorConvertActionType variable
PDColorConvertActionType actionType = kColorConvConvert;
//Populate the PDColorConvertAction data members
myAction->mMatchAttributesAny = -1;
myAction->mMatchSpaceTypeAny = -1;
myAction->mMatchIntent= AC_UseProfileIntent;
myAction->mConvertProfile=prof ;
myAction->mEmbed = true;
myAction->mPreserveBlack = false;
myAction->mUseBlackPointCompensation= true;
myAction->mAction = actionType;
//Populate the PDColorConvertParams pointer
myColorParams->mActions=myAction;
myColorParams->mNumActions=1;
myColorParams->mInks= NULL;
myColorParams->mNumInks=0;
//Convert the second page to Apple RGB
PDDocColorConvertPage (theDoc, myColorParams, 1, NULL, NULL,0,NULL,false);
//Deallocate the AC_Profile object
ACUnReferenceProfile(prof);
For information about the APIs included in the AcroColor extended API, see the
Acrobat and PDF Library API
Reference
.