Details
Description
ICEpdf has had annotation creation tools for quite some time but they were never designed to support the PDF transparency model. This is further complicated by the fact the default java colour picker allows users to select rgba colour values but the PDF specification only allows the setting of rgb values (actually other colour models too but none with alpha).
Transparency was not possible in early version of the PDF specification and as a result to support legacy viewers the addition of alpha support had to be done in a way not to break backwards compatibility. As a result the extended graphics state was introduced and supporting viewers could implement the new transparency model and old viewers could simply ignore it.
Transparency was not possible in early version of the PDF specification and as a result to support legacy viewers the addition of alpha support had to be done in a way not to break backwards compatibility. As a result the extended graphics state was introduced and supporting viewers could implement the new transparency model and old viewers could simply ignore it.
The Following notes are from the PDF specification iso-3200.
Starting with PDF 1.4, an annotation appearance may include transparency. If the appearance’s stream dictionary does not contain a Group entry, it shall be treated as a non-isolated, non-knockout transparency group. Otherwise, the isolated and knockout values specified in the group dictionary (see 11.6.6, “Transparency Group XObjects”) shall be used.
The transparency group shall be composited with a backdrop consisting of the page content along with any previously painted annotations, using a blend mode of Normal, an alpha constant of 1.0, and a soft mask of None.
NOTE 1
If a transparent annotation appearance is painted over an annotation that is drawn without using an appearance stream, the effect is implementation-dependent. This is because such annotations are sometimes drawn by means that do not conform to the PDF imaging model. Also, the effect of highlighting a transparent annotation appearance is implementation-dependent.
Also the following notes for markup annotations:
(Optional; PDF 1.4) The constant opacity value that shall be used in painting the annotation (see Sections 11.2, “Overview of Transparency,”and 11.3.7, “Shape and Opacity Computations”). This value shall apply to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened.
The specified value shall not used if the annotation has an appearance stream (see 12.5.5, “Appearance Streams”); in that case, the appearance stream shall specify any transparency. (However, if the compliant viewer regenerates the annotation’s appearance stream, it may incorporate the CA value into the stream’s content.)
The implicit blend mode (see 11.3.5, “Blend Mode””) is Normal. Default value: 1.0.
If no explicit appearance stream is defined for the annotation, it may bepainted by implementation-dependent means that do not necessarily conform to the PDF imaging model; in this case, the effect of this entry is implementation-dependent as well.