Part 2 of our deep dive into key updates to the PDF standard – ISO 32000-2. Miss Part 1? Read about the Latest in PDF Testing.
Overview of ISO 32000-2 (PDF 2.0)
ISO 32000-2 (PDF 2.0) is now an official ISO standard. This new version introduces many different updates to the de facto document exchange format that exists today on virtually every desktop and mobile platforms.
In our previous post, we summarized the key updates that this new PDF 2.0 standard includes. In this issue, we will delve deeper into a few of these areas.
QualityLogic is also excited to announce that the new PDF 2.0 Functional Test Suite that covers the new features in the ISO 32000-2 standard will be released by the end of October 2017. We have developed over 120 new test cases to cover the updated features introduced in the ISO 32000-2 standard.
Black Point Compensation
Black Point Compensation applies to CIE colors where the black point of the original is rendered by the black point of the output device. This feature is analogous to White Point Compensation, which was supported in the ISO 32000-1 standard. Although the ability to compensate for both the white point and black point of the rendering device has existed in CIE and ICC workflows, the new ISO 32000-2 standard introduces a graphic state parameter called UseBlackPtComp (can be ON, OFF or Default). Here’s an example that provides an excellent illustration of Black Point Compensation. Note the fine details in the hair areas due to black point compensation.
During CIE color rendering, if the AbsoluteColorimetric rendering intent is selected, the black point (and white point) compensation does not occur, so this feature is only in effect for other rendering intents. Furthermore, UseBlackPtComp key is part of the ExtGState (graphic state) dictionary so the graphic state that has this key turned on must be in effect in order for this compensation to take place. There are other PDF scenarios where the graphics state is sometimes inherited (for example, patterns and transparency). In these cases, the PDF generation to use UseBlackPtComp must be carefully considered so that the correct graphic state with such keys is used when intended.
Indexed Color Space
Indexed color space has been around for years where an array of color values is mapped to a base color space, ex. [/Indexed base hival lookup]. Although this color space is a straightforward one to use, the inherent calculation of the indexed value using base and hival sometimes can result in rounding errors, as the PDF rendered rounds it to an integer.
Here’s an example of our test file on various PDF renderers. Note the various rounding errors as implemented by various PDF applications and browsers. The rounding rule for Indexed color states:
“The index value should be an integer in the range 0 to hival. If the value is a real number, it shall be rounded to the nearest integer (0.5 values shall be rounded up); if it is outside the range 0 to hival, it shall be adjusted to the nearest value within that range.”
Inline images have been a useful feature as an alternative means for embedding image data as XObjects. The syntax for Inline images is simple with essentially the following sequence:
… Key-value pairs …
… Image data …
The Key-value pairs include BitsPerComponent, ColorSpace, Decode, DecodeParams, Filter, Height, ImageMask, Intent, Interpolate, Length and Width keys. The new ISO 32000-2 standard enhances this feature by adding a Length key/value support that specifies the length of the inline image in bytes (since inline images are designed for small images, the largest value a Length value can be is 4096 bytes). This Length key provides PDF renderers to conveniently skip an inline image if it does not need to render it.
% Start Test 1725
% Inline images
144 0 0 180 234 472 cm
/D [1 0] /L 12960
… binary data …
The PDF standard now supports UTF-8 is as a text string type. Although the UTF-8 standard itself has been popular in other technical domains (for example, XML, XPS, web technologies), prior versions of the PDF standard had limited support for UTF-8 encoding. The ISO
32000-2 standard introduces wider support.
UTF-8 is a one- to four-byte encoding that supports the full set of Unicode code points. The new PDF standard categorizes the UTF-8 encoded string as ‘text string’. ‘Text string’ is used for character strings that contain information intended to be human-readable, such as text annotations, password, names, text streams, file specification, collection item dictionary, optional content dictionary, etc.
QualityLogic’s new PDF 2.0 Functional Test Suite includes a number of UTF-8 usage test cases.
Does a BBox of zero height or width still render anything? According to the new PDF 2.0 standard, a BBox of zero height or width will still paint one pixel. This behavior in the past has been implementation-dependent, and many implementations have opted to mirror the behavior of the Adobe Acrobat implementation.
Now, the new PDF 2.0 standard has this behavior documented in order to bring uniformity to this corner case rendering behavior.
Above are example renderings of a new test case from the QualityLogic PDF 2.0 FTS.
Updated PDF Test Suites
QualityLogic develops test suites that are used by printing and application vendors to perform deep technical testing of their PDF implementations. We’ve updated these PDF test suites for the PDF 2.0 test changes:
- New! PDF 2.0 Functional Test Suite (FTS)
- PDF Application Test Suite (ATS) – coming soon!
- New! PDF InteropAnalyzer 2.0
For more information about the PDF 2.0 Functional Test Suite and other PDF test tools, get in touch at www.qualitylogic.com/contact/ or call us at +1 805 531 9030 ext. 133.