PDFPAGE_GetColorSpace
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method retrieves the index of the current ICC-based color mapping profile.

Syntax

LONG PDFPAGE_GetColorSpace ()
Return value
Index of the currently selected ICC-based color mapping profile or -1, if there is no ICC-based color mapping profile selected

Remarks

PDFPAGE_GetColorSpace retrieves index of a currently selected ICC-based color mapping profile. The returned value can be used in PDFPAGE_SetColorSpace.

Example

How to Retrieve the Index of an ICC-Based Colorspace

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
profile := PDF.LoadICCProfile('EuropeISOCoatedFOGRA27.icc');
PDF.PDFPAGE_SetColorSpace(profile);
retrieved := PDF.PDFPAGE_GetColorSpace();
{ retrieved should be equal to profile } 
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG profile = PDF->LoadICCProfile("EuropeISOCoatedFOGRA27.icc");
PDF->PDFPAGE_SetColorSpace(profile);
LONG retrieved = PDF->PDFPAGE_GetColorSpace();
// retrieved should be equal to profile
PDF.EndDoc;
C#
[copy to clipboard]
PDF.BeginDoc();
long profile = PDF.LoadICCProfile("EuropeISOCoatedFOGRA27.icc");
PDF.PDFPAGE_SetColorSpace(profile);
long retrieved = PDF.PDFPAGE_GetColorSpace();
// retrieved should be equal to profile
PDF.EndDoc;
Visual Basic
[copy to clipboard]
PDF.BeginDoc
profile = PDF.LoadICCProfile("EuropeISOCoatedFOGRA27.icc")
PDF.PDFPAGE_SetColorSpace profile
retrieved = PDF.PDFPAGE_GetColorSpace()
' retrieved should be equal to profile
PDF.EndDoc

See Also

Reference