comparison mupdf-source/docs/reference/common/glossary.rst @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 Glossary
2 ========
3
4 .. glossary::
5 :sorted:
6
7 Alpha
8 Opacity
9
10 Alpha values are real numbers in the closed interval from 0 to 1,
11 where 0 means full transparency, and 1 means full opacity.
12
13 Blend Mode
14
15 Blend modes define how a layer of graphics combines with a backdrop.
16
17 Below is an illustration of the visual effect for RGB colors for the blend
18 modes defined for PDF.
19
20 For further details refer to the PDF specification's `section
21 on blend modes
22 <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G12.12449365>`_.
23
24 .. imagesvg:: ../../images/blendmodes.svg
25 :tagtype: object
26 :width: 75%
27
28 File specification
29
30 In PDF a file specification names a file.
31
32 If a file specification only contains a file name or a path,
33 then it represents an external file. Such a file is assumed
34 to be found at the specified location in the file system.
35
36 A file specification may also embed the file contents as a
37 stream inside the PDF. In this case the file specification
38 represents an embedded file. For embedded files, further
39 metadata may be stored (e.g. file size, creation and
40 modification date).
41
42 For more details read the PDF specification's section on
43 `file specifications
44 <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G8.1640832>`_.
45
46 Knockout and Isolation
47
48 In a knockout transparency group each element overwrites the prior
49 elements in the group instead of compositing with them.
50
51 In an isolated transparency group the group does not composite with
52 the group's backdrop, but rather a fully transparent backdrop.
53
54 For further details refer to the PDF specification's sections on
55 `isolation <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G12.1689467>`_
56 and
57 `knockout <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G12.1689478>`_.
58
59 .. imagesvg:: ../../images/knockout-isolated.svg
60 :tagtype: object
61 :width: 75%
62
63 Winding
64 Non-zero Winding Number Rule
65 Even-Odd Rule
66
67 These rules in PDF defined what parts of a `Path` are inside and
68 outside the curve respectively. This is used to determine what parts
69 of a curve should be filled.
70
71 See the PDF specification sections on the
72 `Non-zero Winding Number Rule <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G9.1850134>`_
73 and
74 `Even-Odd Rule <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G9.1850155>`_.
75
76 Line Cap Style
77
78 PDFs define three different shapes for the ends of unclosed subpaths:
79 butt cap, round cap, and square cap. See below for the visual effect and
80 refer to the PDF specifications section about `Line Cap Styles
81 <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G9.1849678>`_
82 for details.
83
84 .. imagesvg:: ../../images/line-caps.svg
85 :tagtype: object
86 :width: 75%
87
88 Line Join Style
89
90 PDFs define three different shapes for the joining of two lines in a
91 subpath: miter join, round join, and bevel join. See below for the
92 visual effects and refer to the PDF specifications section about `Line
93 Join Styles <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G9.1849699>`_
94 for details.
95
96 .. imagesvg:: ../../images/line-joins.svg
97 :tagtype: object
98 :width: 50%
99
100 Miter Limit
101
102 When mitered line joins are used, then lines joining at sharper and
103 sharper angles will produce longer and longer miters. The miter may stick
104 out longer than anticipated. Therefore PDF defines a miter limit value,
105 at which a longer miter join will be changed to a bevel join. See below
106 for the visual effects and refer to the PDF specifications section about
107 `Miter Limit
108 <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G9.3859627>`_
109 for details.
110
111 .. imagesvg:: ../../images/miter-limit.svg
112 :tagtype: object
113 :width: 75%
114
115 QuadPoint
116
117 A QuadPoint in PDF is a non-axis aligned quadrilateral, used to define
118 areas on the page that typically cover text (which may be rotated, or
119 skewed). It is given as an array of 8 numbers (four x, y pairs).
120
121 QuadPoints are used with Link and text markup annotations.
122
123 The order of the points is a matter of confusion, because the order
124 used in the PDF reference doesn't match the order that Adobe uses.
125
126 This is the order that is typically used:
127 ``[ ulx uly urx ury llx lly lrx lry ]``
128
129 Page Box
130
131 The PDF reference defines several boxes to determine different parts
132 of a page. See the chapter on
133 `Page Boundaries <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G15.2260711>`_
134 for more details.
135
136 MediaBox
137 The MediaBox defines the size of the physical medium on
138 which the page is to be printed. It includes items that
139 will be physically trimmed from the final product like
140 crop marks, registration marks, etc.
141
142 CropBox
143 The CropBox defines the visible region of the page to
144 be displayed or printed. This has no real meaning, but
145 is used to clip the page contents when rendering.
146
147 BleedBox
148 The BleedBox defines the region to which the page
149 contents expect to be clipped. This includes any extra
150 bleed area to account for imprecision in the printing
151 process.
152
153 TrimBox
154 The TrimBox defines the intended dimensions of the
155 finished page after trimming.
156
157 ArtBox
158 The ArtBox defines the area where it is considered safe
159 to place graphical elements.
160
161 Standard Structure Type
162
163 The PDF specification defines how a PDF can specify a logical structure
164 hierarchy of elements, similar to of HTML or XML. Each of the
165 `defined structure elements <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G15.2259688>`_,
166 e.g. Div, BlockQuote, P, H1-H6 etc., are associated with some visual
167 content.
168
169 Line Ending Style
170
171 Styles used to draw line endings for certain annotations.
172 Below is an illustration with the name of each style.
173 The example uses black line color, with both none and
174 blue interior color.
175
176 .. imagesvg:: ../../images/line-ending-styles.svg
177 :tagtype: object
178 :width: 75%
179
180 Border Style
181
182 Annotations have have two border styles:
183 Solid, Dashed
184
185 More fancy borders are defined by the :term:`border effect`.
186
187 Border Effect
188
189 Fancier borders can be drawn with a border effect:
190 None, Cloudy
191
192 Annotation Type
193
194 There are many annotation types defined in the PDF reference.
195
196 MuPDF supports the following types:
197 Text, FreeText, Square, Circle, Line, Polygon,
198 PolyLine, Highlight, Underline, Squiggly, StrikeOut,
199 Redact, Stamp, Caret, Ink, Popup, FileAttachment,
200 Redaction
201
202 These types are not supported yet:
203 Sound, Movie, RichMedia, Widget, Screen, PrinterMark,
204 TrapNet, Watermark, 3D, Projection
205
206 Widget Type
207
208 Widgets are a type of annotation.
209 There are a few different subtypes:
210
211 Btn
212 Pushbutton, Check Boxes, Radio Buttons
213 Tx
214 Text Fields
215 Ch
216 Choice Fields (list box, combo box)
217 Sig
218 Signature Field
219
220 Icon Name
221
222 Some annotations appear as an icon.
223 The available icons differ per annotation type.
224
225 Text
226 Comment,
227 Help,
228 Insert,
229 Key,
230 NewParagraph,
231 Note,
232 Paragraph
233 FileAttachment
234 Graph,
235 PaperClip,
236 PushPin,
237 Tag
238 Sound
239 Mic,
240 Speaker
241 Stamp
242 Approved,
243 AsIs,
244 Confidential,
245 Departmental,
246 Draft,
247 Experimental,
248 Expired,
249 Final,
250 ForComment,
251 ForPublicRelease,
252 NotApproved,
253 NotForPublicRelease,
254 Sold,
255 TopSecret
256
257 MIME-type
258
259 A MIME-type is a string describing the type of data.
260 PDF data has the MIME-type "application/pdf", while
261 unknown data has the MIME-type
262 "application/octet-stream". For further details see the
263 specification that the PDF specification references:
264 `RFC 2048 - Multipurpose Internet Mail Extensions
265 (MIME) Part Two: Media Types
266 <https://www.rfc-editor.org/info/rfc2048>`_.
267
268 Language code
269
270 Language codes consists of a primary code, followed
271 zero or more by subcodes each preceded by a hyphen,
272 e.g. "en", "en-US", "kr", "zh-CN", "zh-TW".
273
274 For further details see the PDF specification's section
275 on `Language Identifiers
276 <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf#G15.2262093>`_.
277
278 Associated File
279
280 TODO
281
282 CMYK JPEG
283
284 The situation with JPEG and CMYK colorspaces is complicated, and depends on
285 many factors such as App markers, the ColorTransform PDF parameter, and whether
286 a JPEG is intended as a standalone or embedded in PDF.
287
288 TODO: explain our behavior, and adobe's behavior, and when impossible situations appear