@@ -11,29 +11,29 @@ Some other simpler tasks are also required.
11
11
This checklist covers everything that is required to create a conformant PDF/UA (PDF for
12
12
Universal Accessibility) document (which is an extension of Tagged PDF):
13
13
14
- * Pass the option ` pdfVersion: '1.5' ` (or a higher version) when creating your ` PDFDocument `
15
- (depending on the features you use, you may only need 1.4; refer to the PDF reference for
16
- details).
17
- * Pass the option ` subset: 'PDF/UA' ` when creating your ` PDFDocument ` (if you wish the PDF to
18
- be identified as PDF/UA-1).
19
- * Pass the option ` tagged: true ` when creating your ` PDFDocument ` (technically, this sets the
20
- ` Marked ` property in the ` Markings ` dictionary to ` true ` in the PDF).
21
- * Provide a ` Title ` in the ` info ` option, and pass ` displayTitle: true ` when creating your
22
- ` PDFDocument ` .
23
- * Specify natural language in the document options and/or logical structure and/or
24
- non-structure marked ` Span ` content.
25
- * Add logical structure with all significant content included.
26
- * Include accessibility information (such as alternative text, actual text, etc.) in the
27
- logical structure and/or non-structure marked ` Span ` content.
28
- * Include all spaces which separate words/sentences/etc. in your marked structure content,
29
- even at the ends of lines, paragraphs, etc.. I.e. don't do ` doc.text("Hello, world!") ` but
30
- instead do ` doc.text("Hello, world! ") ` .
31
- * Mark all non-structure content as artifacts.
32
- * As well as creating the logical structure, write objects to the PDF in the natural
33
- "reading order".
34
- * Do not convey information solely using visuals (such as colour,
35
- contrast or position on the page).
36
- * No flickering or flashing content.
14
+ - Pass the option ` pdfVersion: '1.5' ` (or a higher version) when creating your ` PDFDocument `
15
+ (depending on the features you use, you may only need 1.4; refer to the PDF reference for
16
+ details).
17
+ - Pass the option ` subset: 'PDF/UA' ` when creating your ` PDFDocument ` (if you wish the PDF to
18
+ be identified as PDF/UA-1).
19
+ - Pass the option ` tagged: true ` when creating your ` PDFDocument ` (technically, this sets the
20
+ ` Marked ` property in the ` Markings ` dictionary to ` true ` in the PDF).
21
+ - Provide a ` Title ` in the ` info ` option, and pass ` displayTitle: true ` when creating your
22
+ ` PDFDocument ` .
23
+ - Specify natural language in the document options and/or logical structure and/or
24
+ non-structure marked ` Span ` content.
25
+ - Add logical structure with all significant content included.
26
+ - Include accessibility information (such as alternative text, actual text, etc.) in the
27
+ logical structure and/or non-structure marked ` Span ` content.
28
+ - Include all spaces which separate words/sentences/etc. in your marked structure content,
29
+ even at the ends of lines, paragraphs, etc.. I.e. don't do ` doc.text("Hello, world!") ` but
30
+ instead do ` doc.text("Hello, world! ") ` .
31
+ - Mark all non-structure content as artifacts.
32
+ - As well as creating the logical structure, write objects to the PDF in the natural
33
+ "reading order".
34
+ - Do not convey information solely using visuals (such as colour,
35
+ contrast or position on the page).
36
+ - No flickering or flashing content.
37
37
38
38
## Marked Content
39
39
@@ -57,18 +57,18 @@ Tags to use are listed in a later section.
57
57
58
58
When marking content, you can provide options (take care to use correct capitalisation):
59
59
60
- * ` type ` - used for artifact content; may be ` Pagination ` (e.g. headers and footers),
61
- ` Layout ` (e.g. rules and backgrounds) or ` Page ` (cut marks etc.)
62
- * ` bbox ` - bounding box for artifact content: ` [left, top, right, bottom] ` in default
63
- coordinates
64
- * ` attached ` - used for ` Pagination ` artifact content, array of one or more strings:
65
- ` Top ` , ` Bottom ` , ` Left ` , ` Right `
66
- * ` lang ` - used for ` Span ` content: human language code (e.g. ` en-AU ` ) which overrides default
67
- document language, and any enclosing structure element language
68
- * ` alt ` - used for ` Span ` content: alternative text for an image or other visual content
69
- * ` expanded ` - used for ` Span ` content: the expanded form of an abbreviation or acronym
70
- * ` actual ` - used for ` Span ` content: the actual text the content represents (e.g. if it is
71
- rendered as vector graphics)
60
+ - ` type ` - used for artifact content; may be ` Pagination ` (e.g. headers and footers),
61
+ ` Layout ` (e.g. rules and backgrounds) or ` Page ` (cut marks etc.)
62
+ - ` bbox ` - bounding box for artifact content: ` [left, top, right, bottom] ` in default
63
+ coordinates
64
+ - ` attached ` - used for ` Pagination ` artifact content, array of one or more strings:
65
+ ` Top ` , ` Bottom ` , ` Left ` , ` Right `
66
+ - ` lang ` - used for ` Span ` content: human language code (e.g. ` en-AU ` ) which overrides default
67
+ document language, and any enclosing structure element language
68
+ - ` alt ` - used for ` Span ` content: alternative text for an image or other visual content
69
+ - ` expanded ` - used for ` Span ` content: the expanded form of an abbreviation or acronym
70
+ - ` actual ` - used for ` Span ` content: the actual text the content represents (e.g. if it is
71
+ rendered as vector graphics)
72
72
73
73
It is advisable not to use ` Span ` content for specifying alternative text, expanded form, or
74
74
actual text, especially if there is a possibility of the content automatically wrapping, which
@@ -169,10 +169,10 @@ you cannot mix atomic and incremental styles for the same structure element.
169
169
170
170
For an element to be flushed out, it must:
171
171
172
- * be ended,
173
- * have been added to its parent, and
174
- * if it has content defined through closures (see next section), be attached to the document's
175
- structure (through its ancestors)
172
+ - be ended,
173
+ - have been added to its parent, and
174
+ - if it has content defined through closures (see next section), be attached to the document's
175
+ structure (through its ancestors)
176
176
177
177
When you call ` doc.end() ` , the document's structure is recursively ended, resulting in all
178
178
elements being flushed out. If you created elements but forgot to add them to the document's
@@ -200,8 +200,8 @@ This is equivalent to:
200
200
myStruct.add(myStructContent);
201
201
myStruct.end();
202
202
203
- Note that the content is marked and the closure is executed * if /when the element is attached to
204
- the document's structure * . This means that you can do something like this:
203
+ Note that the content is marked and the closure is executed _ if /when the element is attached to
204
+ the document's structure _ . This means that you can do something like this:
205
205
206
206
const myParagraph = doc.struct('P', [
207
207
() => { doc.text("Please see ", { continued: true }); },
@@ -231,11 +231,11 @@ It's best to add elements to their parents as you go.
231
231
232
232
When creating a structure element, you can provide options:
233
233
234
- * ` title ` - title of the structure element (e.g. "Chapter 1")
235
- * ` lang ` - human language code (e.g. ` en-AU ` ) which overrides default document language
236
- * ` alt ` - alternative text for an image or other visual content
237
- * ` expanded ` - the expanded form of an abbreviation or acronym
238
- * ` actual ` - the actual text the content represents (e.g. if it is rendered as vector graphics)
234
+ - ` title ` - title of the structure element (e.g. "Chapter 1")
235
+ - ` lang ` - human language code (e.g. ` en-AU ` ) which overrides default document language
236
+ - ` alt ` - alternative text for an image or other visual content
237
+ - ` expanded ` - the expanded form of an abbreviation or acronym
238
+ - ` actual ` - the actual text the content represents (e.g. if it is rendered as vector graphics)
239
239
240
240
Example of a structure tree with options specified:
241
241
@@ -308,69 +308,69 @@ ensure you give them with the correct capitalisation.
308
308
309
309
Non-structure tags:
310
310
311
- * ` Artifact ` - used to mark all content not part of the logical structure
312
- * ` ReversedChars ` - every string of text has characters in reverse order for technical reasons
313
- (due to how fonts work for right-to-left languages); strings may have spaces at the
314
- beginning or end to separate words, but may not have spaces in the middle
311
+ - ` Artifact ` - used to mark all content not part of the logical structure
312
+ - ` ReversedChars ` - every string of text has characters in reverse order for technical reasons
313
+ (due to how fonts work for right-to-left languages); strings may have spaces at the
314
+ beginning or end to separate words, but may not have spaces in the middle
315
315
316
316
"Grouping" elements:
317
317
318
- * ` Document ` - whole document; must be used if there are multiple parts or articles
319
- * ` Part ` - part of a document
320
- * ` Art ` - article
321
- * ` Sect ` - section; may nest
322
- * ` Div ` - generic division
323
- * ` BlockQuote ` - block quotation
324
- * ` Caption ` - describing a figure or table
325
- * ` TOC ` - table of contents, may be nested, and may be used for lists of figures, tables, etc.
326
- * ` TOCI ` - table of contents (leaf) item
327
- * ` Index ` - index (text with accompanying ` Reference ` content)
328
- * ` NonStruct ` - non-structural grouping element (element itself not intended to be exported to
329
- other formats like HTML, but 'transparent' to its content which is processed normally)
330
- * ` Private ` - content only meaningful to the creator (element and its content not intended to
331
- be exported to other formats like HTML)
318
+ - ` Document ` - whole document; must be used if there are multiple parts or articles
319
+ - ` Part ` - part of a document
320
+ - ` Art ` - article
321
+ - ` Sect ` - section; may nest
322
+ - ` Div ` - generic division
323
+ - ` BlockQuote ` - block quotation
324
+ - ` Caption ` - describing a figure or table
325
+ - ` TOC ` - table of contents, may be nested, and may be used for lists of figures, tables, etc.
326
+ - ` TOCI ` - table of contents (leaf) item
327
+ - ` Index ` - index (text with accompanying ` Reference ` content)
328
+ - ` NonStruct ` - non-structural grouping element (element itself not intended to be exported to
329
+ other formats like HTML, but 'transparent' to its content which is processed normally)
330
+ - ` Private ` - content only meaningful to the creator (element and its content not intended to
331
+ be exported to other formats like HTML)
332
332
333
333
"Block" elements:
334
334
335
- * ` H ` - heading (first element in a section, etc.)
336
- * ` H1 ` to ` H6 ` - heading of a particular level intended for use only if nesting sections
337
- is not possible for some reason
338
- * ` P ` - paragraph
339
- * ` L ` - list; should include optional ` Caption ` , and list items
340
- * ` LI ` - list item; should contain ` Lbl ` and/or ` LBody `
341
- * ` Lbl ` - label (bullet, number, or "dictionary headword")
342
- * ` LBody ` - list body (item text, or "dictionary definition"); may have nested lists or other blocks
335
+ - ` H ` - heading (first element in a section, etc.)
336
+ - ` H1 ` to ` H6 ` - heading of a particular level intended for use only if nesting sections
337
+ is not possible for some reason
338
+ - ` P ` - paragraph
339
+ - ` L ` - list; should include optional ` Caption ` , and list items
340
+ - ` LI ` - list item; should contain ` Lbl ` and/or ` LBody `
341
+ - ` Lbl ` - label (bullet, number, or "dictionary headword")
342
+ - ` LBody ` - list body (item text, or "dictionary definition"); may have nested lists or other blocks
343
343
344
344
"Table" elements:
345
345
346
- * ` Table ` - table; should either contain ` TR ` , or ` THead ` , ` TBody ` and/or ` TFoot `
347
- * ` TR ` - table row
348
- * ` TH ` - table heading cell
349
- * ` TD ` - table data cell
350
- * ` THead ` - table header row group
351
- * ` TBody ` - table body row group; may have more than one per table
352
- * ` TFoot ` - table footer row group
346
+ - ` Table ` - table; should either contain ` TR ` , or ` THead ` , ` TBody ` and/or ` TFoot `
347
+ - ` TR ` - table row
348
+ - ` TH ` - table heading cell
349
+ - ` TD ` - table data cell
350
+ - ` THead ` - table header row group
351
+ - ` TBody ` - table body row group; may have more than one per table
352
+ - ` TFoot ` - table footer row group
353
353
354
354
"Inline" elements:
355
355
356
- * ` Span ` - generic inline content
357
- * ` Quote ` - inline quotation
358
- * ` Note ` - e.g. footnote; may have a ` Lbl ` (see "block" elements)
359
- * ` Reference ` - content in a document that refers to other content (e.g. page number in an index)
360
- * ` BibEntry ` - bibliography entry; may have a ` Lbl ` (see "block" elements)
361
- * ` Code ` - code
362
- * ` Link ` - hyperlink; should contain a link annotation
363
- * ` Annot ` - annotation (other than a link)
364
- * ` Ruby ` - Chinese/Japanese pronunciation/explanation
365
- * ` RB ` - Ruby base text
366
- * ` RT ` - Ruby annotation text
367
- * ` RP ` - Ruby punctuation
368
- * ` Warichu ` - Japanese/Chinese longer description
369
- * ` WT ` - Warichu text
370
- * ` WP ` - Warichu punctuation
356
+ - ` Span ` - generic inline content
357
+ - ` Quote ` - inline quotation
358
+ - ` Note ` - e.g. footnote; may have a ` Lbl ` (see "block" elements)
359
+ - ` Reference ` - content in a document that refers to other content (e.g. page number in an index)
360
+ - ` BibEntry ` - bibliography entry; may have a ` Lbl ` (see "block" elements)
361
+ - ` Code ` - code
362
+ - ` Link ` - hyperlink; should contain a link annotation
363
+ - ` Annot ` - annotation (other than a link)
364
+ - ` Ruby ` - Chinese/Japanese pronunciation/explanation
365
+ - ` RB ` - Ruby base text
366
+ - ` RT ` - Ruby annotation text
367
+ - ` RP ` - Ruby punctuation
368
+ - ` Warichu ` - Japanese/Chinese longer description
369
+ - ` WT ` - Warichu text
370
+ - ` WP ` - Warichu punctuation
371
371
372
372
"Illustration" elements (should have ` alt ` and/or ` actualtext ` set):
373
373
374
- * ` Figure ` - figure
375
- * ` Formula ` - formula
376
- * ` Form ` - form widget
374
+ - ` Figure ` - figure
375
+ - ` Formula ` - formula
376
+ - ` Form ` - form widget
0 commit comments