Repository navigation
PDF Spec 10 General
Part of: PDF-Spec-10-Rendering
Navigation: ← Previous | PDF-Spec-Index | PDF-Spec-10-Color-Conversions
Nearly all of the rendering facilities that are under the control of a PDF file pertain to the reproduction of colour. Colours shall be rendered by a conforming reader using the following multiple-step process outlined.
- NOTE 1 The PDF imaging model separates graphics (the specification of shapes and colours) from rendering (controlling a raster output device). Figures 20 and 21 in 8.6.3, "Colour Space Families" illustrate this division. 8, "Graphics" describes the facilities for specifying the appearance of pages in a device-independent way. This clause describes the facilities for controlling how shapes and colours are rendered on the raster output device. All of the facilities discussed here depend on the specific characteristics of the output device. PDF files that are intended to be device-independent should limit themselves to the general graphics facilities described in 8, "Graphics".
Depending on the current colour space and on the characteristics of the device, it is not always necessary to perform every step.
- a) If a colour has been specified in a CIE-based colour space (see 8.6.5, "CIE-Based Colour Spaces"), it shall first be transformed to the native colour space of the raster output device (also called its process colour model ).
- b) If a colour has been specified in a device colour space that is inappropriate for the output device (for example, RGB colour with a CMYK or grayscale device), a colour conversion function shall be invoked.
- c) The device colour values shall now be mapped through transfer functions , one for each colour component.
NOTE 2 The transfer functions compensate for peculiarities of the output device, such as nonlinear gray-level response. This step is sometimes called gamma correction .
- d) If the device cannot reproduce continuous tones, but only certain discrete colours such as black and white pixels, a halftone function shall be invoked, which approximates the desired colours by means of patterns of pixels.
- e) Finally, scan conversion shall be performed to mark the appropriate pixels of the raster output device with the requested colours.
Once these operations have been performed for all graphics objects on the page, the resulting raster data shall be used to mark the physical output medium, such as pixels on a display or ink on a printed page. A PDF file may specify very little about the properties of the physical medium on which the output will be produced; that information may be obtained from the following sources by a conforming reader:
- The media box and a few other entries in the page dictionary (see 14.11.2, "Page Boundaries").
- An interactive dialogue conducted when the user requests viewing or printing.
- A job ticket , either embedded in the PDF file or provided separately, that may specify detailed instructions for imposing PDF pages onto media and for controlling special features of the output device. Various standards exist for the format of job tickets. Two of them, JDF (Job Definition Format) and PJTF (Portable Job Ticket Format), are described in the CIP4 document JDF Specification and in Adobe Technical Note #5620, Portable Job Ticket Format (see the Bibliography), respectively.
Table 58 in 8.4.5, "Graphics State Parameter Dictionaries" lists the various device-dependent graphics state parameters that may be used to control certain aspects of rendering. To invoke these parameters, the gs operator shall be used.
To render CIE-based colours on an output device, the conforming reader shall convert from the specified CIEbased colour space to the device's native colour space (typically DeviceGray , DeviceRGB , or DeviceCMYK ), taking into account the known properties of the device.
- NOTE 1 As discussed in 8.6.5, "CIE-Based Colour Spaces" CIE-based colour is based on a model of human colour perception. The goal of CIE-based colour rendering is to produce output in the device's native colour space that accurately reproduces the requested CIE-based colour values as perceived by a human observer. CIEbased colour specification and rendering are a feature of PDF 1.1 ( CalGray , CalRGB , and Lab ) and PDF 1.3 (ICCBased).
- NOTE 2 The conversion from CIE-based colour to device colour is complex, and the theory on which it is based is beyond the scope of this specification. The algorithm has many parameters, including an optional, full threedimensional colour lookup table. The colour fidelity of the output depends on having these parameters properly set, usually by a method that includes some form of calibration. The colours that a device can produce are characterized by a device profile , which is usually specified by an ICC profile associated with the device (and entirely separate from the profile that is specified in an ICCBased colour space).
- NOTE 3 PDF has no equivalent of the PostScript colour rendering dictionary. The means by which a device profile is associated with a conforming reader's output device are implementation-dependent and not specified in a PDF file. Typically, this is done through a colour management system (CMS) that is provided by the operating system. Beginning with PDF 1.4, a PDF file can also specify one or more output intents providing possible profiles that may be used to process the file (see 14.11.5, "Output Intents").
Conversion from a CIE-based colour value to a device colour value requires two main operations:
- a) The CIE-based colour value shall be adjusted according to a CIE-based gamut mapping function.
- NOTE 4 A gamut is a subset of all possible colours in some colour space. A page description has a source gamut consisting of all the colours it uses. An output device has a device gamut consisting of all the colours it can reproduce. This step transforms colours from the source gamut to the device gamut in a way that attempts to preserve colour appearance, visual contrast, or some other explicitly specified rendering intent (see 8.6.5.8, "Rendering Intents").
- b) A corresponding device colour value shall be generated according to a CIE-based colour mapping function. For a given CIE-based colour value, this function shall compute a colour value in the device's native colour space.
The CIE-based gamut and colour mapping functions shall be applied only to colour values presented in a CIEbased colour space. Colour values in device colour spaces directly control the device colour components though this may be altered by the DefaultGray , DefaultRGB , and DefaultCMYK colour space resources (see 8.6.5.6, "Default Colour Spaces").
The source gamut shall be specified by the information contained in the definition of the CIE-based colour space when selected. This specification shall be device-independent. The corresponding properties of the output device shall be given in the device profile associated with the device. The gamut mapping and colour mapping functions are part of the implementation of the conforming reader.
Navigation: ← Previous | PDF-Spec-Index | PDF-Spec-10-Color-Conversions