How does the PDF Library work with a document's OutputIntent?
Estimated Reading Time: 1 MinutesThe Output Intent is an optional entry in the document catalog, or root dictionary. It is an array of OutputIntent dictionaries that describe the color reproduction characteristics of possible output devices. The purpose of the OutputIntent is to allow you to associate one or more color profiles with a PDF document, so that the function sending a PDF to an output device (such as a printer) can select the appropriate profile to use. The OutputIntent in a PDF document can define more than one color profile for that document.
See Section 14.11.5, “Output Intents,” in the ISO 32000 Reference, page 633.
If the target document does not have an output intent, you can build your Adobe PDF Library application to copy it from a source document:
CosObj inRoot = CosDocGetRoot (PDDocGetCosDoc (pddoc)); CosDoc outCosDoc = PDDocGetCosDoc (newDocument); CosObj outRoot = CosDocGetRoot (outCosDoc); CosObj OIEntry = CosDictGetKeyString (inRoot, "OutputIntents"); if (CosObjGetType (OIEntry) != CosNull) { /* If the source PDF has an OI entry, copy if over to the target PDF */ CosDictPutKeyString (outRoot, "OutputIntents", CosObjCopy (OIEntry, outCosDoc, true)); }
The output intent is not copied by default.
Note that the Output intent is never processed by the Adobe PDF Library. It is carried in the dictionary, and may be accessed by a processing program. That program may use the information to vary the display of the document.