60
PDF 32000-1:2008
308
©
Adobe Systems Incorporated 2008 – All rights reserved
A threshold value of 0 shall be treated as if it were 1; therefore, a gray level of 0.0 paints all pixels black,
regardless of the values in the threshold array.
This scheme easily generalizes to monochrome devices with multiple bits per pixel, where each pixel can
directly represent intermediate gray levels in addition to black and white. For any device pixel that is specified
with some in-between gray level, the halftoning algorithm shall consult the corresponding value in the threshold
array to determine whether to use the next-lower or next-higher representable gray level. In this situation, the
threshold values do not represent absolute gray levels, but rather gradations between any two adjacent
representable gray levels.
EXAMPLE
If there are 2 bits per pixel, each pixel can directly represent one of four different gray levels: black, dark
gray, light gray, or white, encoded as 0, 1, 2, and 3, respectively.
NOTE
A halftone defined in this way can also be used with colour displays that have a limited number of values for
each colour component. The red, green, and blue components are simply treated independently as gray
levels, applying the appropriate threshold array to each. (This technique also works for a screen defined as a
spot function, since the spot function is used to compute a threshold array internally.)
10.5.5
Halftone Dictionaries
10.5.5.1 General
In PDF 1.2, the graphics state includes a current halftone parameter, which determines the halftoning process
that a conforming reader shall use to perform painting operations. The current halftone may be specified as the
value of the HT entry in a graphics state parameter dictionary; see Table 58. It may be defined by either a
dictionary or a stream, depending on the type of halftone; the term halftone dictionary is used generically
throughout this clause to refer to either a dictionary object or the dictionary portion of a stream object. (The
halftones that are defined by streams are specifically identified as such in the descriptions of particular halftone
types; unless otherwise stated, they are understood to be defined by simple dictionaries instead.)
Every halftone dictionary shall have a HalftoneType entry whose value shall be an integer specifying the
overall type of halftone definition. The remaining entries in the dictionary are interpreted according to this type.
PDF supports the halftone types listed in Table 129.
NOTE 1
The dictionaries representing these halftone types contain the same entries as the corresponding PostScript
language halftone dictionaries (as described in Section 7.4 of the PostScript Language Reference, Third
Edition), with the following exceptions:
Table 129 – PDF halftone types
Type
Meaning
1
Defines a single halftone screen by a frequency, angle , and spot
function.
5
Defines an arbitrary number of halftone screens, one for each colorant
or colour component (including both primary and spot colorants). The
keys in this dictionary are names of colorants; the values are halftone
dictionaries of other types, each defining the halftone screen for a single
colorant.
6
Defines a single halftone screen by a threshold array containing 8-bit
sample values.
10
Defines a single halftone screen by a threshold array containing 8-bit
sample values, representing a halftone cell that may have a nonzero
screen angle.
16
(PDF 1.3) Defines a single halftone screen by a threshold array
containing 16-bit sample values, representing a halftone cell that may
have a nonzero screen angle.
67
©
Adobe Systems Incorporated 2008 – All rights reserved
309
PDF 32000-1:2008
The PDF dictionaries may contain a Type entry with the value Halftone, identifying the type of PDF object that
the dictionary describes.
Spot functions and transfer functions are represented by function objects instead of PostScript procedures.
Threshold arrays are specified as streams instead of files.
In type 5 halftone dictionaries, the keys for colorants shall be name objects; they may not be strings as they
may in PostScript.
Halftone dictionaries have an optional entry, HalftoneName, that identifies the halftone by name. In PDF 1.3, if
this entry is present, all other entries, including HalftoneType, are optional. At rendering time, if the output
device has a halftone with the specified name, that halftone shall be used, overriding any other halftone
parameters specified in the dictionary.
NOTE 2
This provides a way for PDF files to select the proprietary halftones supplied by some device manufacturers,
which would not otherwise be accessible because they are not explicitly defined in PDF.
If there is no HalftoneName entry, or if the requested halftone name does not exist on the device, the halftone’s
parameters shall be defined by the other entries in the dictionary, if any. If no other entries are present, the
default halftone shall be used.
NOTE 3
See 11.7.5, "Rendering Parameters and Transparency" and, in particular, “Halftone and Transfer Function” in
11.7.5.2 for further discussion of the role of halftones in the transparent imaging model.
10.5.5.2 Type 1 Halftones
Table 130 describes the contents of a halftone dictionary of type 1, which defines a halftone screen in terms of
its frequency, angle, and spot function.
Table 130 – Entries in a type 1 halftone dictionary
Key
Type
Value
Type
name
(Optional) The type of PDF object that this dictionary describes;
if present, shall be Halftone for a halftone dictionary.
HalftoneType
integer
(Required) A code identifying the halftone type that this
dictionary describes; shall be 1 for this type of halftone.
HalftoneName
byte string
(Optional) The name of the halftone dictionary.
Frequency
number
(Required) The screen frequency, measured in halftone cells per
inch in device space.
Angle
number
(Required) The screen angle, in degrees of rotation
counterclockwise with respect to the device coordinate system.
NOTE
Most output devices have left-handed device
spaces. On such devices, a counterclockwise angle
in device space corresponds to a clockwise angle
in default user space and on the physical medium.
SpotFunction
function or name
(Required) A fun
ction object defining the order in which device
pixels within a screen cell shall be adjusted for different gray
levels, or the name of one of the predefined spot functions (see
Table 128).
AccurateScreens
boolean
(Optional) A flag specifying whether to invoke a special halftone
algorithm that is extremely precise but computationally
expensive; see Note 1 for further discussion. Default value:
false.
72
PDF 32000-1:2008
310
©
Adobe Systems Incorporated 2008 – All rights reserved
If the AccurateScreens entry has a value of true , a highly precise halftoning algorithm shall be substituted in
place of the standard one. If AccurateScreens is false or not present, ordinary halftoning shall be used.
NOTE 1
Accurate halftoning achieves the requested screen frequency and angle with very high accuracy, whereas
ordinary halftoning adjusts them so that a single screen cell is quantized to device pixels. High accuracy is
important mainly for making colour separations on high-resolution devices. However, it may be computationally
expensive and therefore is ordinarily disabled.
NOTE 2
In principle, PDF permits the use of halftone screens with arbitrarily large cells—in other words, arbitrarily low
frequencies. However, cells that are very large relative to the device resolution or that are oriented at
unfavorable angles may exceed the capacity of available memory. If this happens, an error occurs. The
AccurateScreens feature often requires very large amounts of memory to achieve the highest accuracy.
EXAMPLE
The following shows a halftone dictionary for a type 1 halftone.
28 0 obj
<< /Type /Halftone
/HalftoneType 1
/Frequency 120
/Angle 30
/SpotFunction /CosineDot
/TransferFunction /Identity
>>
endobj
10.5.5.3 Type 6 Halftones
A type 6 halftone defines a halftone screen with a threshold array. The halftone shall be represented as a
stream containing the threshold values; the parameters defining the halftone shall be specified by entries in the
stream dictionary. This dictionary may contain the entries shown in Table 131 in addition to the usual entries
common to all streams (see Table 5). The Width and Height entries shall specify the dimensions of the
threshold array in device pixels; the stream shall contain Width
×
Height bytes, each representing a single
threshold value. Threshold values are defined in device space in the same order as image samples in image
space (see Figure 34), with the first value at device coordinates (0, 0) and horizontal coordinates changing
faster than vertical coordinates.
TransferFunction
function or name
(Optional) A transfer function, which overrides the current
transfer function in the graphics state for the same component.
This entry shall be present if the dictionary is a component of a
type 5 halftone (see “Type 5 Halftones” in 10.5.5.6) and
represents either a nonprimary or nonstandard primary colour
component (see 10.4, "Transfer Functions"). The name Identity
may be used to specify the identity function.
Table 131 – Additional entries specific to a type 6 halftone dictionary
Key
Type
Value
Type
name
(Optional) The type of PDF object that this dictionary describes;
if present, shall be Halftone for a halftone dictionary.
HalftoneType
integer
(Required) A code identifying the halftone type that this
dictionary describes; shall be 6 for this type of halftone.
HalftoneName
byte string
(Optional) The name of the halftone dictionary.
Width
integer
(Required) The width of the threshold array, in device pixels.
Height
integer
(Required) The height of the threshold array, in device pixels.
Table 130 – Entries in a type 1 halftone dictionary (continued)
Key
Type
Value
47
©
Adobe Systems Incorporated 2008 – All rights reserved
311
PDF 32000-1:2008
10.5.5.4 Type 10 Halftones
Type 6 halftones specify a threshold array with a zero screen angle; they make no provision for other angles.
The type 10 halftone removes this restriction and allows the use of threshold arrays for halftones with nonzero
screen angles as well.
Halftone cells at nonzero angles can be difficult to specify because they may not line up well with scan lines
and because it may be difficult to determine where a given sampled point goes. The type 10 halftone addresses
these difficulties by dividing the halftone cell into a pair of squares that line up at zero angles with the output
device’s pixel grid. The squares contain the same information as the original cell but are much easier to store
and manipulate. In addition, they can be mapped easily into the internal representation used for all rendering.
NOTE 1
Figure 50 shows a halftone cell with a frequency of 38.4 cells per inch and an angle of 50.2 degrees,
represented graphically in device space at a resolution of 300 dots per inch. Each asterisk in the figure
represents a location in device space that is mapped to a specific location in the threshold array.
Figure 50 – Halftone cell with a nonzero angle
NOTE 2
Figure 51 shows how the halftone cell can be divided into two squares. If the squares and the original cell are
tiled across device space, the area to the right of the upper square maps exactly into the empty area of the
lower square, and vice versa (see Figure 52). The last row in the first square is immediately adjacent to the first
row in the second square and starts in the same column.
TransferFunction
function or name
(Optional) A transfer function, which shall override the current
transfer function in the graphics state for the same component.
This entry shall be present if the dictionary is a component of a
type 5 halftone (see “Type 5 Halftones” in 10.5.5.6) and
represents either a nonprimary or nonstandard primary colour
component (see 10.4, "Transfer Functions"). The name Identity
may be used to specify the identity function.
Table 131 – Additional entries specific to a type 6 halftone dictionary (continued)
Key
Type
Value
* * * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *
* * * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *
*
200
PDF 32000-1:2008
312
©
Adobe Systems Incorporated 2008 – All rights reserved
Figure 51 – Angled halftone cell divided into two squares
Figure 52 – Halftone cell and two squares tiled across device space
NOTE 3
Any halftone cell can be divided in this way. The side of the upper square (X) is equal to the horizontal
displacement from a point in one halftone cell to the corresponding point in the adjacent cell, such as those
marked by asterisks in Figure 52. The side of the lower square (Y) is the vertical displacement between the
same two points. The frequency of a halftone screen constructed from squares with sides X and Y is thus
given by
and the angle by
* * * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *
* * * * * * * * * *
* * * * * * * *
* * * * * *
* * * *
* *
*
X
Y
a
a
a a
a
a
a
a a
a
a
a a
a
a
a
a a
a a
a
a
a
a
a
a
a
a
a
a
a
a
a a
a
a
a
a a
a
a
a a
a
a
a
a a
a a
a
a
a
a
a
a
a
a
a
a
a
b b
b
b
b
* b b b b
b
b
b
b
b b
b
b
b
b
b
b b
b
b
b
b b
b
b
b b
b
b
b
b b
b
b
b
b
b
b
b
b b
b
b
b
b
b
b b
b
b
b
b b
b
b
b
c c
c
c
c *
c
c
c
c
c
c
c
c
c c
c
c
c
c
c
c c
c
c
c
c c
c
c
c c
c
c
c
c c
c
c
c
c
c
c
c
c c
c
c
c
c
c
c c
c
c
c
c c
c
c
c
X
X
X
Y
Y
Y
Y
frequency
resolution
X
2
Y
2
+
------------------------
=
angle
Y
X
---
⎝ ⎠
⎛ ⎞
atan
=
Documents you may be interested
Documents you may be interested