numColorSpaces
Get the number of PDF color space types.
[read-only property]
numColorSpaces([out, retval] int *n)
The available color space types are defined by the PDF
specification. As of PDF 1.7, they are:
- DeviceGray
- CalGray
- DeviceRGB
- CalRGB
- DeviceCMYK
- Lab
- ICCBased
- Indexed
- Separation
- DeviceN
- Pattern
numColorSpaces
property and getColorSpaceName
function return the items in the list above. (In general, that list
won't change - i.e., numColorSpaces
and
getColorSpaceName
will always return the same values - but future
revisions to the PDF spec may add color space types, and
XpdfRasterizer will be updated to match.)
The getNumColorSpaceObjects
function will return the number of
objects drawn in a specified color space type on a specified page.
VB:
n = pdf.numColorSpaces
For i = 0 To n-1
name = pdf.getColorSpaceName(i)
count = pdf.getNumColorSpaceObjects(page, i)
MsgBox(count & " objects drawn in the " & name & " color space type")
Next i