PDF Reference 1.7

TABLE 4.1 Operator categories

第196页

CATEGORY OPERATORS TABLE PAGE
General graphics state w, J, j, M, d, ri, i, gs 4.7 219
Special graphics state q, Q, cm 4.7 219
Path construction m, l, c, v, y, h, re 4.9 226
Path painting S, s, f, F, f*, B, B*, b, b*, n 4.10 230
Clipping paths W, W* 4.11 235
Text objects BT, ET 5.4 405
Text state Tc, Tw, Tz, TL, Tf, Tr, Ts 5.2 398
Text positioning Td, TD, Tm, T* 5.5 406
Text showing Tj, TJ, ‘, " 5.6 407
Type 3 fonts d0, d1 5.10 423
Color CS, cs, SC, SCN, sc, scn, G, g, RG, rg, K, k 4.24 287
Shading patterns sh 4.27 303
Inline images BI, ID, EI 4.42 352
XObjects Do 4.37 332
Marked content MP, DP, BMC, BDC, EMC 10.7 851
Compatibility BX, EX 3.29 152

TABLE 4.8 Entries in a graphics state parameter dictionary

第220页

KEY TYPE DESCRIPTION 中文翻译
Type name (Optional) The type of PDF object that this dictionary describes; must be ExtGState for a graphics state parameter dictionary. (可选) 此字典描述的 PDF 对象的类型;对于图形状态参数字典,必须为 ExtGState。
LW number (Optional; PDF 1.3) The line width (see “Line Width” on page 215). (可选;PDF 1.3) 线宽(参见第215页的 “线宽”)。
LC integer (Optional; PDF 1.3) The line cap style (see “Line Cap Style” on page 216). (可选;PDF 1.3) 线端样式(参见第216页的 “线端样式”)。
LJ integer (Optional; PDF 1.3) The line join style (see “Line Join Style” on page 216). (可选;PDF 1.3) 线连接样式(参见第216页的 “线连接样式”)。
ML number (Optional; PDF 1.3) The miter limit (see “Miter Limit” on page 217). (可选;PDF 1.3) 斜接限制(参见第217页的 “斜接限制”)。
D array (Optional; PDF 1.3) The line dash pattern, expressed as an array of the form [dashArray dashPhase], where dashArray is itself an array and dashPhase is an integer (see “Line Dash Pattern” on page 217). (可选;PDF 1.3) 线虚线模式,表示为形式为 [dashArray dashPhase] 的数组,其中 dashArray 本身是一个数组,dashPhase 是一个整数(参见第217页的 “线虚线模式”)。
RI name (Optional; PDF 1.3) The name of the rendering intent (see “Rendering Intents” on page 260). (可选;PDF 1.3) 渲染意图的名称(参见第260页的 “渲染意图”)。
OP boolean (Optional) A flag specifying whether to apply overprint (see Section 4.5.6, “Overprint Control”). In PDF 1.2 and earlier, there is a single overprint parameter that applies to all painting operations. Beginning with PDF 1.3, there are two separate overprint parameters: one for stroking and one for all other painting operations. Specifying an OP entry sets both parameters unless there is also an op entry in the same graphics state parameter dictionary, in which case the OP entry sets only the overprint parameter for stroking. (可选)一个标志,指定是否应用过印(见第4.5.6节,“过印控制”)。在PDF 1.2及之前的版本中,有一个适用于所有绘画操作的单个过印参数。从PDF 1.3开始,有两个单独的过印参数:一个用于描边,另一个用于所有其他绘画操作。指定OP条目会设置两个参数,除非同一图形状态参数字典中还有一个op条目,在这种情况下,OP条目仅设置描边的过印参数。
op boolean (Optional; PDF 1.3) A flag specifying whether to apply overprint (see Section 4.5.6, “Overprint Control”) for painting operations other than stroking. If this entry is absent, the OP entry, if any, sets this parameter. (可选; PDF 1.3)一个标志,指定是否应用过印(见第4.5.6节,“过印控制”)于除描边以外的绘画操作。如果此条目不存在,则任何OP条目将设置此参数。
OPM integer (Optional; PDF 1.3) The overprint mode (see Section 4.5.6, “Overprint Control”). (可选; PDF 1.3)过印模式(见第4.5.6节,“过印控制”)。
Font array (Optional; PDF 1.3) An array of the form [ font size ], where font is an indirect reference to a font dictionary and size is a number expressed in text space units. These two objects correspond to the operands of the Tf operator (see Section 5.2, “Text State Parameters and Operators”); however, the first operand is an indirect object reference instead of a resource name. (可选; PDF 1.3)一个形式为[字体大小]的数组,其中字体是对字体字典的间接引用,大小是以文本空间单位表示的数字。这两个对象对应于Tf操作符的操作数(见第5.2节,“文本状态参数和操作符”);但是,第一个操作数是一个间接对象引用,而不是资源名称。
BG function (Optional) The black-generation function, which maps the interval [ 0.0 1.0 ] to the interval [ 0.0 1.0 ] (see Section 6.2.3, “Conversion from DeviceRGB to DeviceCMYK”). (可选)黑色生成函数,将区间[0.0 1.0]映射到区间[0.0 1.0] (见第6.2.3节,“从DeviceRGB到DeviceCMYK的转换”)。
BG2 function or name (Optional; PDF 1.3) Same as BG except that the value may also be the name Default, denoting the black-generation function that was in effect at the start of the page. If both BG and BG2 are present in the same graphics state parameter dictionary, BG2 takes precedence. (可选; PDF 1.3)与BG相同,只是值还可以是名称Default,表示页面开始时生效的黑色生成函数。如果同一个图形状态参数字典中同时存在BG和BG2,则BG2优先。
UCR function (Optional) The undercolor-removal function, which maps the interval [ 0.0 1.0 ] to the interval [ −1.0 1.0 ] (see Section 6.2.3, “Conversion from DeviceRGB to DeviceCMYK”). (可选)底色去除函数,将区间[0.0 1.0]映射到区间[−1.0 1.0] (见第6.2.3节,“从DeviceRGB到DeviceCMYK的转换”)。
UCR2 function or name (Optional; PDF 1.3) Same as UCR except that the value may also be the name Default, denoting the undercolor-removal function that was in effect at the start of the page. If both UCR and UCR2 are present in the same graphics state parameter dictionary, UCR2 takes precedence. (可选; PDF 1.3)与UCR相同,只是值还可以是名称Default,表示页面开始时生效的底色去除函数。如果同一个图形状态参数字典中同时存在UCR和UCR2,则UCR2优先。
TR function, array, or name (Optional) The transfer function, which maps the interval [ 0.0 1.0 ] to the interval [ 0.0 1.0 ] (see Section 6.3, “Transfer Functions”). The value is either a single function (which applies to all process colorants) or an array of four functions (which apply to the process colorants individually). The name Identity may be used to represent the identity function. (可选)传输函数,将区间[0.0 1.0]映射到区间[0.0 1.0] (见第6.3节,“传输函数”)。值可以是单个函数(适用于所有过程颜料)或四个函数的数组(适用于各个过程颜料)。名称Identity可用于表示身份函数。
TR2 function, array, or name (Optional; PDF 1.3) Same as TR except that the value may also be the name Default, denoting the transfer function that was in effect at the start of the page. If both TR and TR2 are present in the same graphics state parameter dictionary, TR2 takes precedence. (可选; PDF 1.3)与TR相同,只是值也可以是名称Default,表示页面开始时生效的传输函数。如果同一个图形状态参数字典中同时存在TR和TR2,则TR2优先。
HT dictionary, stream, or name (Optional) The halftone dictionary or stream (see Section 6.4, “Halftones”) or the name Default, denoting the halftone that was in effect at the start of the page. (可选)半色调字典或流(见第6.4节,“半色调”),或名称Default,表示页面开始时生效的半色调。
FL number (Optional; PDF 1.3) The flatness tolerance (see Section 6.5.1, “Flatness Tolerance”). (可选; PDF 1.3)平坦度容差(见第6.5.1节,“平坦度容差”)。
SM number (Optional; PDF 1.3) The smoothness tolerance (see Section 6.5.2, “Smoothness Tolerance”). (可选; PDF 1.3)平滑度容差(见第6.5.2节,“平滑度容差”)。
SA boolean (Optional) A flag specifying whether to apply automatic stroke adjustment (see Section 6.5.4, “Automatic Stroke Adjustment”). (可选)一个标志,指定是否应用自动描边调整(见第6.5.4节,“自动描边调整”)。
BM name or array (Optional; PDF 1.4) The current blend mode to be used in the transparent imaging model (see Sections 7.2.4, “Blend Mode,” and 7.5.2, “Specifying Blending Color Space and Blend Mode”). (可选; PDF 1.4)用于透明成像模型中的当前混合模式(见第7.2.4节,“混合模式”和第7.5.2节,“指定混合颜色空间和混合模式”)。
SMask dictionary or name (Optional; PDF 1.4) The current soft mask, specifying the mask shape or mask opacity values to be used in the transparent imaging model (see “Source Shape and Opacity” on page 526 and “Mask Shape and Opacity” on page 550). (可选; PDF 1.4)当前软蒙版,指定要在透明成像模型中使用的蒙版形状或蒙版不透明度值(见第526页的“源形状和不透明度”和第550页的“蒙版形状和不透明度”)。
CA number (Optional; PDF 1.4) The current stroking alpha constant, specifying the constant shape or constant opacity value to be used for stroking operations in the transparent imaging model (see “Source Shape and Opacity” on page 526 and “Constant Shape and Opacity” on page 551). (可选; PDF 1.4)当前描边透明度常数,指定要在透明成像模型中用于描边操作的恒定形状或恒定不透明度值(见第526页的“源形状和不透明度”和第551页的“恒定形状和不透明度”)。
ca number (Optional; PDF 1.4) Same as CA, but for nonstroking operations. (可选; PDF 1.4)与CA相同,但用于非描边操作。
AIS boolean (Optional; PDF 1.4) The alpha source flag (“alpha is shape”), specifying whether the current soft mask and alpha constant are to be interpreted as shape values (true) or opacity values (false). (可选; PDF 1.4) Alpha源标志(“alpha即形状”),指定当前软蒙版和alpha常数是否被解释为形状值(true)或不透明度值(false)。
TK boolean (Optional; PDF 1.4) The text knockout flag, which determines the behavior of overlapping glyphs within a text object in the transparent imaging model (see Section 5.2.7, “Text Knockout”). (可选; PDF 1.4) 文本击除标志,确定在透明成像模型中文本对象中重叠字形的行为(见第5.2.7节,“文本击除”)。

TABLE 5.5 Text-positioning operators

OPERANDS OPERATOR DESCRIPTION 描述
tx ty Td Move to the start of the next line, offset from the start of the current line by (tx, ty). tx and ty are numbers expressed in unscaled text space units. More precisely, this operator performs the following assignments: 移动到下一行的起始位置,相对于当前行的起始位置偏移 (tx, ty)。tx 和 ty 是以未缩放的文本空间单位表示的数字。更准确地说,此操作符执行以下赋值操作:
tx ty TD Move to the start of the next line, offset from the start of the current line by (tx, ty). As a side effect, this operator sets the leading parameter in the text state. This operator has the same effect as the following code: -ty TL tx ty Td 移动到下一行的起始位置,相对于当前行的起始位置偏移 (tx, ty)。作为副作用,此操作符设置文本状态中的行间距参数。此操作符与以下代码具有相同效果:-ty TL tx ty Td
a b c d e f Tm Set the text matrix, Tm, and the text line matrix, Tlm: The operands are all numbers, and the initial value for Tm and Tlm is the identity matrix, [1 0 0 1 0 0]. Although the operands specify a matrix, they are passed to Tm as six separate numbers, not as an array. The matrix specified by the operands is not concatenated onto the current text matrix, but replaces it. 设置文本矩阵 Tm 和文本行矩阵 Tlm:操作数都是数字,并且 Tm 和 Tlm 的初始值是单位矩阵 [1 0 0 1 0 0]。尽管操作数指定了一个矩阵,但它们作为六个单独的数字传递给 Tm,而不是作为数组。由操作数指定的矩阵不会连接到当前文本矩阵上,而是替换它。
- T* Move to the start of the next line. This operator has the same effect as the code 0 Tl Td, where Tl is the current leading parameter in the text state. 移动到下一行的起始位置。此操作符与代码 0 Tl Td 具有相同效果,其中 Tl 是文本状态中的当前行间距参数。

TD应该是控制行距位置,对应OFD的TextCode的X、Y

Td应该是控制字距位置,对应OFD的TextCode的DeltaX、DeltaY

TABLE 4.7 Graphics state operators

第219页

OPERANDS OPERATOR DESCRIPTION 描述
q Save the current graphics state on the graphics state stack (see “Graphics State Stack” on page 214). 将当前图形状态保存到图形状态堆栈中(参见第214页的“图形状态堆栈”)。
Q Restore the graphics state by removing the most recently saved state from the stack and making it the current state (see “Graphics State Stack” on page 214). 从堆栈中移除最近保存的状态并将其恢复为当前状态,来恢复图形状态(参见第214页的“图形状态堆栈”)。
a b c d e f cm Modify the current transformation matrix (CTM) by concatenating the specified matrix (see Section 4.2.1, “Coordinate Spaces”). Although the operands specify a matrix, they are written as six separate numbers, not as an array. 通过连接指定的矩阵来修改当前的转换矩阵(CTM)(参见第4.2.1节的“坐标空间”)。尽管操作数指定了一个矩阵,但它们是作为六个独立的数字而不是数组来编写的。
lineWidth w Set the line width in the graphics state (see “Line Width” on page 215). 设置图形状态下的线宽(参见第215页的“线宽”)。
lineCap J Set the line cap style in the graphics state (see “Line Cap Style” on page 216). 设置图形状态下的线端点样式(参见第216页的“线端点样式”)。
lineJoin j Set the line join style in the graphics state (see “Line Join Style” on page 216). 设置图形状态下的线连接样式(参见第216页的“线连接样式”)。
miterLimit M Set the miter limit in the graphics state (see “Miter Limit” on page 217). 设置图形状态下的斜接限制(参见第217页的“斜接限制”)。
dashArray dashPhase d Set the line dash pattern in the graphics state (see “Line Dash Pattern” on page 217). 设置图形状态下的虚线样式(参见第217页的“虚线样式”)。
intent ri (PDF 1.1) Set the color rendering intent in the graphics state (see “Rendering Intents” on page 260). (PDF 1.1)设置图形状态下的颜色渲染意图(参见第260页的“渲染意图”)。
flatness i Set the flatness tolerance in the graphics state (see Section 6.5.1, “Flatness Tolerance”). flatness is a number in the range 0 to 100; a value of 0 specifies the output device’s default flatness tolerance. 设置图形状态下的平直度容差(参见第6.5.1节的“平直度容差”)。平直度是一个在0到100范围内的数字;值为0表示输出设备的默认平直度容差。
dictName gs (PDF 1.2) Set the specified parameters in the graphics state. dictName is the name of a graphics state parameter dictionary in the ExtGState subdictionary of the current resource dictionary (see the next section). (PDF 1.2)设置图形状态中的指定参数。dictName是当前资源字典的ExtGState子字典中的图形状态参数字典的名称(参见下一节)。

TABLE 4.9 Path construction operators

OPERANDS OPERATOR DESCRIPTION 描述
x y m Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment. If the previous path construction operator in the current path was also m, the new moverrides it; no vestige of the previous m operation remains in the path. 通过将当前点移动到坐标 (x, y) 开始一个新的子路径,省略任何连接线段。如果当前路径中的前一个路径构造操作符也是 m,则新的操作符将覆盖它;路径中不保留先前 m 操作的痕迹。
x y l Append a straight line segment from the current point to the point (x, y). The new current point is (x, y). 从当前点到点 (x, y) 追加一条直线段。新的当前点是 (x, y)。
x1 y1 x2 y2 x3 y3 c Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier control points (see “Cubic Bézier Curves,” below). The new current point is (x3, y3). 在当前路径上追加一个三次贝塞尔曲线。曲线从当前点延伸到点 (x3, y3),使用 (x1, y1) 和 (x2, y2) 作为贝塞尔曲线的控制点(参见下面的“三次贝塞尔曲线”)。新的当前点是 (x3, y3)。
x2 y2 x3 y3 v Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points (see “Cubic Bézier Curves,” below). The new current point is (x3, y3). 在当前路径上追加一个三次贝塞尔曲线。曲线从当前点延伸到点 (x3, y3),使用当前点和 (x2, y2) 作为贝塞尔曲线的控制点(参见下面的“三次贝塞尔曲线”)。新的当前点是 (x3, y3)。
x1 y1 x3 y3 y Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bézier control points (see “Cubic Bézier Curves,” below). The new current point is (x3, y3). 在当前路径上追加一个三次贝塞尔曲线。曲线从当前点延伸到点 (x3, y3),使用 (x1, y1) 和 (x3, y3) 作为贝塞尔曲线的控制点(参见下面的“三次贝塞尔曲线”)。新的当前点是 (x3, y3)。
h Close the current subpath by appending a straight line segment from the current point to the starting point of the subpath. If the current subpath is already closed, h does nothing. This operator terminates the current subpath. Appending another segment to the current path begins a new subpath, even if the new segment begins at the endpoint reached by the h operation. 通过将当前点追加到子路径的起始点,关闭当前子路径。如果当前子路径已经关闭,h 不执行任何操作。该操作符终止当前子路径。将另一个线段追加到当前路径将开始一个新的子路径,即使新的线段从 h 操作到达的端点开始。
x y width height re Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions width and height in user space. The operation x y width height re is equivalent to x y m ( x + width ) y l ( x + width ) ( y + height ) l x ( y + height ) l h 在当前路径上追加一个矩形作为完整的子路径,矩形的左下角为 (x, y),宽度和高度为用户空间中的尺寸。操作 x y width height re 等同于 x y m ( x + width ) y l ( x + width ) ( y + height ) l x ( y + height ) l h

TABLE 4.11 Clipping path operators

剪切路径操作符

OPERANDS OPERATOR DESCRIPTION 描述
W Modify the current clipping path by intersecting it with the current path, using the nonzero winding number rule to determine which regions lie inside the clipping path. 通过使用非零环绕数规则,将当前剪切路径与当前路径相交,确定哪些区域位于剪切路径内,从而修改当前剪切路径。
W* Modify the current clipping path by intersecting it with the current path, using the even-odd rule to determine which regions lie inside the clipping path. 通过使用奇偶规则,将当前剪切路径与当前路径相交,确定哪些区域位于剪切路径内,从而修改当前剪切路径。

TABLE 8.16 Annotation flags

第608页

BIT POSITION NAME MEANING 含义
1 Invisible If set, do not display the annotation if it does not belong to one of the standard annotation types and no annotation handler is available. If clear, display such an unknown annotation using an appearance stream specified by its appearance dictionary, if any (see Section 8.4.4, “Appearance Streams”). 如果设置,如果注释不属于标准注释类型且没有可用的注释处理程序,则不显示该注释。如果清除,则使用其外观字典指定的外观流显示此类未知注释(如果有)(参见第8.4.4节,“外观流”)。
2 Hidden (PDF 1.2) If set, do not display or print the annotation or allow it to interact with the user, regardless of its annotation type or whether an annotation handler is available. In cases where screen space is limited, the ability to hide and show annotations selectively can be used in combination with appearance streams (see Section 8.4.4, “Appearance Streams”) to display auxiliary pop-up information similar in function to online help systems. (See implementation note 83 in Appendix H.) (PDF 1.2)如果设置,无论其注释类型如何或是否有注释处理程序可用,都不要显示或打印注释,也不要允许其与用户交互。在屏幕空间有限的情况下,可以选择性地隐藏和显示注释的能力可与外观流结合使用(参见第8.4.4节,“外观流”),以显示类似于在线帮助系统的辅助弹出信息。(请参见附录H中的实现说明83。)
3 Print (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of whether it is displayed on the screen. This can be useful, for example, for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page. (See implementation note 83 in Appendix H.) (PDF 1.2)如果设置,打印页面时打印注释。如果清除,无论其是否在屏幕上显示,都不要打印注释。例如,对于表示交互式按钮的注释,此功能可能很有用,因为这些按钮在打印页面上没有任何意义。(请参见附录H中的实现说明83。)
4 NoZoom (PDF 1.3) If set, do not scale the annotation’s appearance to match the magnification of the page. The location of the annotation on the page (defined by the upper-left corner of its annotation rectangle) remains fixed, regardless of the page magnification. See below for further discussion. (PDF 1.3) 如果设置,不要缩放注释的外观以匹配页面的放大倍数。无论页面的放大倍数如何,注释在页面上的位置(由其注释矩形的左上角定义)保持不变。有关更多讨论,请参见下文。
5 NoRotate (PDF 1.3) If set, do not rotate the annotation’s appearance to match the rotation of the page. The upper-left corner of the annotation rectangle remains in a fixed location on the page, regardless of the page rotation. See below for further discussion. (PDF 1.3) 如果设置,不要旋转注释的外观以匹配页面的旋转。无论页面如何旋转,注释矩形的左上角都保持在页面上的固定位置。有关更多讨论,请参见下文。
6 NoView (PDF 1.3) If set, do not display the annotation on the screen or allow it to interact with the user. The annotation may be printed (depending on the setting of the Print flag) but should be considered hidden for purposes of on-screen display and user interaction. (PDF 1.3) 如果设置,不要在屏幕上显示注释或允许用户与之交互。注释可能会被打印(取决于打印标志的设置),但在屏幕显示和用户交互方面应将其视为隐藏。
7 ReadOnly (PDF 1.3) If set, do not allow the annotation to interact with the user. The annotation may be displayed or printed (depending on the settings of the NoView and Print flags) but should not respond to mouse clicks or change its appearance in response to mouse motions. (PDF 1.3) 如果设置,不允许注释与用户交互。注释可能会被显示或打印(取决于NoView和Print标志的设置),但不应对鼠标点击做出响应或在鼠标移动时改变其外观。
8 Locked (PDF 1.4) If set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation’s contents, such as the value of a form field. (See implementation note 84 in Appendix H.) (PDF 1.4) 如果设置,不允许用户删除注释或修改其属性(包括位置和大小)。但是,此标志不限制对注释内容的更改,例如表单字段的值。(请参见附录H中的实现说明84。)
9 ToggleNoView (PDF 1.5) If set, invert the interpretation of the NoView flag for certain events. A typical use is to have an annotation that appears only when a mouse cursor is held over it; see implementation note 85 in Appendix H. (PDF 1.5) 如果设置,倒转NoView标志对于某些事件的解释。一个典型的用法是,只有当鼠标光标放在注释上时才会出现注释;请参见附录H中的实现说明85。
10 LockedContents (PDF 1.7) If set, do not allow the contents of the annotation to be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size. (PDF 1.7) 如果设置,不允许用户修改注释的内容。此标志不限制删除注释或更改其他注释属性,例如位置和大小。

矩阵变换

The transformation between two coordinate systems is represented by a 3-by-3 transformation matrix written as follows:

1
2
3
[a b 0]
[c d 0]
[e f 1]

Because a transformation matrix has only six elements that can be changed, it is usually specified in PDF as the six-element array [ a b c d e f ].

1
2
x2=ax+cy+e
y2=bx+dy+f

image-20240406111805519

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
平移 x=x+e y=y+f
[ 1 0 0 ]
[ 0 1 0 ]
[ e f 1 ]
PDF中的CM  [1 0 0 1 e f]

缩放 x=ax y=dy
[ a 0 0 ]
[ 0 d 0 ]
[ 0 0 1 ]
PDF中的CM  [a 0 0 d 0 0]

旋转
[ cosα  sinα 0 ]
[ -sinα cosα 0 ]
[ 0      0   1 ]
PDF中的CM  [a b c d 0 0]

BBox

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
/*
    OFD
       x1,y1

             x2,y2
    等价于
    PDF

             x2,y1

       x1,y2
*/

OFD与PDF对比

x方向一致

y方向在MediaBox 取边界减

y方向在BBox 取反

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0,0
     x1,1
     
          x2,2
          		         xn,yn
-------------------------------------------------------
以上OFD

以下PDF        		
-------------------------------------------------------
          		         xn,yn
      	  x2,yn-2


     x1,yn-1 
0,0  



PDF_X1=OFD_X1
PDF_Y1=H-OFD_Y1
PDF_X2=OFD_X2
PDF_Y2=H-OFD_Y2

0,1

​ 0,2

Blend Mode(混合模式)BM

Blend Mode(混合模式)用于定义对象与背景或其他对象之间的颜色混合方式。PDF支持多种混合模式,常见的混合模式包括:

  1. Normal:正常混合模式,将对象颜色直接叠加在背景上。
  2. Multiply:乘法混合模式,根据对象颜色的强度与背景颜色的强度相乘,产生混合颜色。
  3. Screen:屏幕混合模式,将对象颜色的补色与背景颜色的补色相乘,然后取反,产生混合颜色。
  4. Overlay:叠加混合模式,根据对象颜色的亮度与背景颜色的亮度进行混合。
  5. Darken:变暗混合模式,根据对象颜色和背景颜色的分量取最小值,产生混合颜色。
  6. Lighten:变亮混合模式,根据对象颜色和背景颜色的分量取最大值,产生混合颜色。
  7. Color Dodge:颜色减淡混合模式,根据对象颜色和背景颜色的分量进行计算,产生混合颜色。
  8. Color Burn:颜色加深混合模式,根据对象颜色和背景颜色的分量进行计算,产生混合颜色。
  9. Hard Light:强光混合模式,根据对象颜色的亮度进行计算,产生混合颜色。
  10. Soft Light:柔光混合模式,根据对象颜色的亮度进行计算,产生混合颜色。
  11. Difference:差值混合模式,根据对象颜色和背景颜色的分量取绝对值后相减,产生混合颜色。
  12. Exclusion:排除混合模式,根据对象颜色和背景颜色的分量进行计算,产生混合颜色。

这些混合模式可以应用于图形对象、图片等内容,用于创建不同的视觉效果。

Annots的/F

第718

F integer (Optional) A set of flags specifying various characteristics of the field’s widget annotation (see Section 8.4.2, “Annotation Flags”). When imported into an interactive form, the value of this entry replaces that of the F entry in the form’s corresponding annotation dictionary. If this field is present, the SetF and ClrF entries, if any, are ignored.

参见TABLE 8.16 Annotation flags