
Adobe Acrobat SDK
Working with Acrobat Extended APIs
Developing Plug-ins and Applications
AcroColor extended API 242
Converting a document to RGB
You can use the AcroColor extended API to convert a document to RGB by performing the following tasks:
1. Create an instance of the
PDColorConvertParams
data structure.
2. Create an
AC_Profile
object. This object is used to assign a value to the
mConvertProfile
data
member that belongs to the
PDColorConvertAction
data structure. When you are done with this
object, invoke the
ACUnReferenceProfile
method to release it from memory.
3. Invoke the
ACProfileFromCode
method and pass the following arguments:
●
The address of the
AC_Profile
object.
●
The value
AC_Profile_AppleRGB
(this is an
AC_ProfileCode
value)
4. Create a
PDColorConvertActionType
variable and assign it the value
kColorConvConvert
. This
variable is used to assign a value to the
mAction
data member that belongs to the
PDColorConvertAction
data structure.
5. Create an instance of the
PDColorConvertAction
data structure and assign the following values to
its data members:
mMatchAttributesAny
: Assign
-1
mMatchSpaceTypeAny
: Assign
-1
mMatchIntent
: Assign
AC_UseProfileIntent
(an
AC_RenderIntent
value)
mConvertProfile
: Assign the
AC_Profile
object
mEmbed
: Assign
true
mPreserveBlack
: Assign
false
mUseBlackPointCompensation
: Assign
true
mAction
: Assign the
PDColorConvertActionType
variable
6. Assign the following values to the PDColorConvertParams data members:
mActions
: Assign the instance of the
PDColorConvertAction
data structure to this data
member
mNumActions
: Assign
1
mInks
: Assign
NULL
mNumInks
: Assign
0
7. Invoke the
PDDocColorConvertPage
method and pass the following arguments:
●
A
PDDoc
object that represents the document in which to convert a page. For information, see
“Creating a PDDoc object” on page 83
.
●
The instance of the
PDColorConvertParams
data structure that describes how color conversions
are performed.
●
An
ASInt32
value that specifies the page number to convert. This value is a 0-based index.
●
An
ASProgressMonitor
object that represents the progress monitor callback. You can pass
NULL
if you do not want to provide a progress monitor callback.