@lpdfio/lpdf 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/attrs.d.ts CHANGED
@@ -55,6 +55,19 @@ export interface ColumnAttr {
55
55
  */
56
56
  paginate?: string;
57
57
  debug?: boolean;
58
+ /**
59
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
60
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
61
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
62
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
63
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
64
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
65
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
66
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
67
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
68
+ * on in a layers panel.
69
+ */
70
+ ocg?: string;
58
71
  align?: string;
59
72
  justify?: string;
60
73
  /**
@@ -63,6 +76,20 @@ export interface ColumnAttr {
63
76
  * line; in a column it takes the full width.
64
77
  */
65
78
  width?: string;
79
+ /**
80
+ * true lays out the texts that the text with data-source repeats one page at a time, straight
81
+ * from the data, for logs and lists of tens of thousands of lines and more. The pages are the
82
+ * ones the same column would have without bulk, but where a page would end inside a text of four
83
+ * lines or more: without bulk the text splits there, and with bulk it moves whole to the next
84
+ * page. The column holds texts only, and they follow rules: a text holds plain words with no
85
+ * span, link, bookmark, footnote or reference, sets no widows or orphans and has no data-source
86
+ * inside it, and a text without max-lines holds one line and ends in an ellipsis. The column sits
87
+ * directly in the layout, has no data-source of its own and one text with it, has no height, and
88
+ * neither it nor anything in it has paginate. Its document has no table of contents, no reference
89
+ * to a bookmark, no pdfua and no pdfa of level a, and its section's columns are not balanced.
90
+ * Breaking a rule is an error that names it. Default false.
91
+ */
92
+ bulk?: boolean;
66
93
  }
67
94
  /**
68
95
  * Children side by side, continuing on the next line when they run out of width. A child with width
@@ -123,6 +150,19 @@ export interface RowAttr {
123
150
  */
124
151
  paginate?: string;
125
152
  debug?: boolean;
153
+ /**
154
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
155
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
156
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
157
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
158
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
159
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
160
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
161
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
162
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
163
+ * on in a layers panel.
164
+ */
165
+ ocg?: string;
126
166
  align?: string;
127
167
  justify?: string;
128
168
  /**
@@ -189,6 +229,19 @@ export interface GridAttr {
189
229
  */
190
230
  paginate?: string;
191
231
  debug?: boolean;
232
+ /**
233
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
234
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
235
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
236
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
237
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
238
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
239
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
240
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
241
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
242
+ * on in a layers panel.
243
+ */
244
+ ocg?: string;
192
245
  /**
193
246
  * Width of the element. A length fixes it. fill, in a row, takes the width its line leaves after
194
247
  * the other children, shared equally if several on the line use fill, and never moves to the next
@@ -197,6 +250,20 @@ export interface GridAttr {
197
250
  width?: string;
198
251
  colWidth?: string;
199
252
  cols?: number;
253
+ /**
254
+ * true lays out the cells that the child with data-source repeats one page at a time, straight
255
+ * from the data, for sheets of tens of thousands of labels or cards and more. The pages are the
256
+ * ones the same grid would have without bulk. The cells follow rules, and so do the grid's other
257
+ * children: a cell is a text, or a column that holds texts, a text holds plain words with no
258
+ * span, link, bookmark, footnote or reference, and sets no widows or orphans, a text without
259
+ * max-lines holds one line and ends in an ellipsis, and nothing in a cell has data-source. A row
260
+ * of cells never splits across pages. The grid sits directly in the layout, has no data-source of
261
+ * its own and one child with it, has no height, and neither it nor anything in it has paginate.
262
+ * Its document has no table of contents, no reference to a bookmark, no pdfua and no pdfa of
263
+ * level a, and its section's columns are not balanced. Breaking a rule is an error that names it.
264
+ * Default false.
265
+ */
266
+ bulk?: boolean;
200
267
  }
201
268
  /**
202
269
  * A list of items, each with a marker: a bullet drawn as a shape, or a number the engine gives. The
@@ -257,6 +324,19 @@ export interface ListAttr {
257
324
  */
258
325
  paginate?: string;
259
326
  debug?: boolean;
327
+ /**
328
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
329
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
330
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
331
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
332
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
333
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
334
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
335
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
336
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
337
+ * on in a layers panel.
338
+ */
339
+ ocg?: string;
260
340
  /** bullet marks each item with a shape, number with a number. Default bullet. */
261
341
  type?: string;
262
342
  /**
@@ -298,6 +378,21 @@ export interface ListAttr {
298
378
  * line; in a column it takes the full width.
299
379
  */
300
380
  width?: string;
381
+ /**
382
+ * true lays out the items that the li with data-source repeats one page at a time, straight from
383
+ * the data, for logs and lists of tens of thousands of items and more. The pages are the ones the
384
+ * same list would have without bulk, but where a page would end inside an item, between its texts
385
+ * or inside a text of four lines or more: without bulk the item splits there, and with bulk it
386
+ * moves whole to the next page. A number list numbers the items as it does without bulk. The list
387
+ * has one level, and its items follow rules: an li holds texts only, a text holds plain words
388
+ * with no span, link, bookmark, footnote or reference, and sets no widows or orphans, a text
389
+ * without max-lines holds one line and ends in an ellipsis, and nothing in an item has
390
+ * data-source. The list sits directly in the layout, has no data-source of its own and one li
391
+ * with it, has no height, and neither it nor anything in it has paginate. Its document has no
392
+ * table of contents, no reference to a bookmark, no pdfua and no pdfa of level a, and its
393
+ * section's columns are not balanced. Breaking a rule is an error that names it. Default false.
394
+ */
395
+ bulk?: boolean;
301
396
  }
302
397
  /**
303
398
  * One item of a list: a box that holds what a layout holds, such as a text, an image, a table or
@@ -359,6 +454,19 @@ export interface LiAttr {
359
454
  */
360
455
  paginate?: string;
361
456
  debug?: boolean;
457
+ /**
458
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
459
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
460
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
461
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
462
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
463
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
464
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
465
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
466
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
467
+ * on in a layers panel.
468
+ */
469
+ ocg?: string;
362
470
  /**
363
471
  * Makes the item's marker a checkbox in place of the bullet or the number: an outline in the line
364
472
  * color, with a tick in the color of the item's words when this is true, and empty when it is
@@ -424,6 +532,19 @@ export interface FrameAttr {
424
532
  */
425
533
  paginate?: string;
426
534
  debug?: boolean;
535
+ /**
536
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
537
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
538
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
539
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
540
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
541
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
542
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
543
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
544
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
545
+ * on in a layers panel.
546
+ */
547
+ ocg?: string;
427
548
  /**
428
549
  * Width of the element. A length fixes it. fill, in a row, takes the width its line leaves after
429
550
  * the other children, shared equally if several on the line use fill, and never moves to the next
@@ -449,6 +570,19 @@ export interface LinkAttr {
449
570
  width?: string;
450
571
  height?: string;
451
572
  debug?: boolean;
573
+ /**
574
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
575
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
576
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
577
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
578
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
579
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
580
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
581
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
582
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
583
+ * on in a layers panel.
584
+ */
585
+ ocg?: string;
452
586
  }
453
587
  /**
454
588
  * Attributes of the `divider` element.
@@ -464,6 +598,19 @@ export interface DividerAttr {
464
598
  */
465
599
  width?: string;
466
600
  debug?: boolean;
601
+ /**
602
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
603
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
604
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
605
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
606
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
607
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
608
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
609
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
610
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
611
+ * on in a layers panel.
612
+ */
613
+ ocg?: string;
467
614
  }
468
615
  /**
469
616
  * Attributes of the `span` element.
@@ -477,6 +624,17 @@ export interface SpanAttr {
477
624
  * table of contents, # alone jumps to that entry's bookmark.
478
625
  */
479
626
  href?: string;
627
+ /**
628
+ * Makes the span a cross-reference to the bookmark with this id: a link to it whose words say
629
+ * where it is. In the span's words, {bookmark-page} prints the page the bookmark is on, as the
630
+ * footer of that page prints it, and {bookmark-label} the bookmark's label, so "{bookmark-label},
631
+ * on page {bookmark-page}" shows "clause 4, on page 12". An id that no bookmark has, another {…}
632
+ * token in the words, and href beside it are errors. It works in a text, a footnote, a region, a
633
+ * text-at and a code. The document is laid out again until each reference shows the page its
634
+ * bookmark lands on, and a reference keeps room for the widest words it has shown, so a number
635
+ * that got narrower can leave a small gap after it.
636
+ */
637
+ bookmarkRef?: string;
480
638
  underline?: boolean;
481
639
  strike?: boolean;
482
640
  }
@@ -501,6 +659,13 @@ export interface CodeSpanAttr {
501
659
  */
502
660
  export interface ImgAttr {
503
661
  name: string;
662
+ /**
663
+ * What the image shows, which a screen reader reads in a tagged document, one with pdfua or a
664
+ * pdfa of level a; alt="" marks it as decoration, which a reader skips. A PDF/UA document needs
665
+ * it on every image of the layout; at PDF/A level a without pdfua, an image without it is
666
+ * decoration. A document that is not tagged ignores it.
667
+ */
668
+ alt?: string;
504
669
  height?: string;
505
670
  /**
506
671
  * Width of the element. A length fixes it. fill, in a row, takes the width its line leaves after
@@ -517,6 +682,19 @@ export interface ImgAttr {
517
682
  radius?: string;
518
683
  paginate?: string;
519
684
  debug?: boolean;
685
+ /**
686
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
687
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
688
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
689
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
690
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
691
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
692
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
693
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
694
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
695
+ * on in a layers panel.
696
+ */
697
+ ocg?: string;
520
698
  }
521
699
  /**
522
700
  * A rectangle, a circle or an ellipse in the layout, for a status dot, a color swatch or a progress
@@ -549,6 +727,19 @@ export interface ShapeAttr {
549
727
  /** How opaque the shape is, from 0 to 1. Default 1. */
550
728
  opacity?: number;
551
729
  debug?: boolean;
730
+ /**
731
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
732
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
733
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
734
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
735
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
736
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
737
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
738
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
739
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
740
+ * on in a layers panel.
741
+ */
742
+ ocg?: string;
552
743
  }
553
744
  /**
554
745
  * A QR code, a Code 128 or an EAN-13. It is never stretched. With only a width or a height, the
@@ -580,8 +771,29 @@ export interface BarcodeAttr {
580
771
  * line; in a column it takes the full width.
581
772
  */
582
773
  width?: string;
774
+ /**
775
+ * What the barcode is for, which a screen reader reads in a tagged document, one with pdfua or a
776
+ * pdfa of level a, in place of its data, which means nothing read aloud: "QR code to pay this
777
+ * invoice". alt="" marks it as decoration. A PDF/UA document needs it on every barcode of the
778
+ * layout; at PDF/A level a without pdfua, a barcode without it is decoration. A document that is
779
+ * not tagged ignores it.
780
+ */
781
+ alt?: string;
583
782
  paginate?: string;
584
783
  debug?: boolean;
784
+ /**
785
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
786
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
787
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
788
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
789
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
790
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
791
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
792
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
793
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
794
+ * on in a layers panel.
795
+ */
796
+ ocg?: string;
585
797
  }
586
798
  /**
587
799
  * A block of wrapping text. Use span children to style parts of it, and fn children for footnotes.
@@ -623,6 +835,14 @@ export interface TextAttr {
623
835
  * line; in a column it takes the full width.
624
836
  */
625
837
  width?: string;
838
+ /**
839
+ * Makes the text a heading, h1 to h6, which a tagged document, one with pdfua or a pdfa of level
840
+ * a, tags as one: a screen reader lists the headings and moves between them. A text without role
841
+ * is a paragraph. A PDF/UA document's headings start at h1 and go down one level at a time. It
842
+ * changes nothing a page shows: set the size and the weight as on any text. A document that is
843
+ * not tagged ignores it.
844
+ */
845
+ role?: string;
626
846
  /**
627
847
  * The fewest lines of the text that may stand alone at the top of the next page when it splits.
628
848
  * Default 2. If fewer would be left, lines move from the first page to the next; 1 turns the
@@ -663,6 +883,19 @@ export interface TextAttr {
663
883
  captureFallback?: string;
664
884
  paginate?: string;
665
885
  debug?: boolean;
886
+ /**
887
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
888
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
889
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
890
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
891
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
892
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
893
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
894
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
895
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
896
+ * on in a layers panel.
897
+ */
898
+ ocg?: string;
666
899
  }
667
900
  /**
668
901
  * Code, or any text whose spaces and lines matter, in a box. The text is kept as it is written:
@@ -727,6 +960,19 @@ export interface CodeAttr {
727
960
  */
728
961
  paginate?: string;
729
962
  debug?: boolean;
963
+ /**
964
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
965
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
966
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
967
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
968
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
969
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
970
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
971
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
972
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
973
+ * on in a layers panel.
974
+ */
975
+ ocg?: string;
730
976
  /**
731
977
  * Width of the element. A length fixes it. fill, in a row, takes the width its line leaves after
732
978
  * the other children, shared equally if several on the line use fill, and never moves to the next
@@ -812,6 +1058,19 @@ export interface TdAttr {
812
1058
  */
813
1059
  paginate?: string;
814
1060
  debug?: boolean;
1061
+ /**
1062
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1063
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1064
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1065
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1066
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1067
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1068
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1069
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1070
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1071
+ * on in a layers panel.
1072
+ */
1073
+ ocg?: string;
815
1074
  /**
816
1075
  * How many of the table's columns the cell spans. It is as wide as those columns and the gaps
817
1076
  * between them, and the cells after it in the row start at the column after its last. A row whose
@@ -838,6 +1097,19 @@ export interface TdAttr {
838
1097
  */
839
1098
  export interface TheadAttr {
840
1099
  background?: string;
1100
+ /**
1101
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1102
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1103
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1104
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1105
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1106
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1107
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1108
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1109
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1110
+ * on in a layers panel.
1111
+ */
1112
+ ocg?: string;
841
1113
  }
842
1114
  /**
843
1115
  * Attributes of the `tr` element.
@@ -852,6 +1124,19 @@ export interface TrAttr {
852
1124
  */
853
1125
  keep?: string;
854
1126
  background?: string;
1127
+ /**
1128
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1129
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1130
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1131
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1132
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1133
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1134
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1135
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1136
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1137
+ * on in a layers panel.
1138
+ */
1139
+ ocg?: string;
855
1140
  }
856
1141
  /**
857
1142
  * Rows and cells in columns whose widths are set by cols. The thead row repeats at the top of every
@@ -896,6 +1181,33 @@ export interface TableAttr {
896
1181
  height?: string;
897
1182
  paginate?: string;
898
1183
  debug?: boolean;
1184
+ /**
1185
+ * true lays out the rows that the tr with data-source repeats one page at a time, straight from
1186
+ * the data, for reports of tens of thousands of rows and more. The pages are the ones the same
1187
+ * table would have without bulk. The rows follow rules, and so do the thead and the other rows:
1188
+ * each td holds one text or none, a text holds plain words with no span, link, bookmark, footnote
1189
+ * or reference, and sets no widows or orphans, a text without max-lines holds one line and ends
1190
+ * in an ellipsis, a td has no rowspan, a row no keep, and nothing in a row has data-source. A row
1191
+ * never splits across pages. The table sits directly in the layout, has no data-source of its own
1192
+ * and one tr with it, sets its cols in fr, pt or %, has no height, and neither it nor anything in
1193
+ * it has paginate. Its document has no table of contents, no reference to a bookmark, no pdfua
1194
+ * and no pdfa of level a, and its section's columns are not balanced. Breaking a rule is an error
1195
+ * that names it. Default false.
1196
+ */
1197
+ bulk?: boolean;
1198
+ /**
1199
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1200
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1201
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1202
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1203
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1204
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1205
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1206
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1207
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1208
+ * on in a layers panel.
1209
+ */
1210
+ ocg?: string;
899
1211
  }
900
1212
  /**
901
1213
  * Attributes of the `field` element.
@@ -922,12 +1234,25 @@ export interface FieldAttr {
922
1234
  background?: string;
923
1235
  border?: string;
924
1236
  debug?: boolean;
1237
+ /**
1238
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1239
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1240
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1241
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1242
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1243
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1244
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1245
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1246
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1247
+ * on in a layers panel.
1248
+ */
1249
+ ocg?: string;
925
1250
  }
926
1251
  /**
927
1252
  * An entry of the PDF's outline, the bookmark panel of a viewer, and a target for links with
928
- * href="#id". It draws nothing and marks the element that follows it, so it is never left at the
929
- * bottom of a page apart from that element. Directly inside a section, it marks the section's first
930
- * page.
1253
+ * href="#id" and for cross-references with bookmark-ref. It draws nothing and marks the element
1254
+ * that follows it, so it is never left at the bottom of a page apart from that element. Directly
1255
+ * inside a section, it marks the section's first page.
931
1256
  */
932
1257
  export interface BookmarkAttr {
933
1258
  /** The text of the entry, in the outline and in a table of contents. */
@@ -938,31 +1263,68 @@ export interface BookmarkAttr {
938
1263
  */
939
1264
  level?: number;
940
1265
  /**
941
- * The name links use to jump here, as href="#id". Leave it out to make it from the label:
942
- * lowercase, with other characters than letters and digits turned into hyphens, and -2, -3 added
943
- * when an earlier bookmark has it. Two bookmarks may not have the same id.
1266
+ * The name links use to jump here, as href="#id", and cross-references as bookmark-ref="id".
1267
+ * Leave it out to make it from the label: lowercase, with other characters than letters and
1268
+ * digits turned into hyphens, and -2, -3 added when an earlier bookmark has it. Two bookmarks may
1269
+ * not have the same id.
944
1270
  */
945
1271
  id?: string;
1272
+ /**
1273
+ * true leaves the bookmark out of the viewer's outline and out of the table of contents, for a
1274
+ * figure or a table: label="Table 3" ref-only="true". Links with href="#id" and cross-references
1275
+ * with bookmark-ref still reach it, and {bookmark-label} still shows its label. Defaults to
1276
+ * false.
1277
+ */
1278
+ refOnly?: boolean;
946
1279
  }
947
1280
  /**
948
1281
  * Pins content to the top or bottom edge of pages, outside the normal flow, for headers and
949
1282
  * footers. It reserves that space on every page it appears on. Only allowed directly inside layout.
950
1283
  * Where it is written among the flow does not matter: pin chooses the edge, and regions on one edge
951
- * stack in the order written.
1284
+ * stack in the order written. With pin set to inset, it is a block at a spot inside the section's
1285
+ * columns instead, such as a picture or a box across two columns of a newsletter: top and height
1286
+ * place it, col and colspan say which columns it covers, and those columns flow around it, filling
1287
+ * above it and carrying on below it.
952
1288
  */
953
1289
  export interface RegionAttr {
954
1290
  /**
955
1291
  * Which edge the region sticks to. top and bottom work. left and right pass validation but are
956
- * not implemented yet.
1292
+ * not implemented yet. inset places the region inside the columns, where top, height, col and
1293
+ * colspan say.
957
1294
  */
958
1295
  pin: string;
959
1296
  /**
960
- * Which pages show the region: each, first, last, odd, even, or a range such as 2-last. Defaults
961
- * to each.
1297
+ * Which pages show the region: each, first, last, odd, even, or a range such as 2-last. odd and
1298
+ * even follow the number printed on the page, so in a section that starts on page 4 even shows on
1299
+ * its first page. first, last and ranges count the section's own pages, whatever their numbers.
1300
+ * Defaults to each. An inset on last goes on the last page of the flow filled without it; if it
1301
+ * then pushes text on to a new page, it stays where it is, one page before the end.
962
1302
  */
963
1303
  page?: string;
964
1304
  w?: string;
965
1305
  debug?: boolean;
1306
+ /**
1307
+ * For pin set to inset: the column the inset starts in, counted from 1 at the left. Defaults to
1308
+ * 1. With colspan, it may not run past the section's columns. An error on any other pin.
1309
+ */
1310
+ col?: number;
1311
+ /**
1312
+ * For pin set to inset: how many columns the inset covers, from col. It is as wide as those
1313
+ * columns and the gaps between them. Defaults to 1. An error on any other pin.
1314
+ */
1315
+ colspan?: number;
1316
+ /**
1317
+ * For pin set to inset, and required with it: how far below the top of the columns the inset
1318
+ * starts, under the headers. An error on any other pin.
1319
+ */
1320
+ top?: string;
1321
+ /**
1322
+ * For pin set to inset, and required with it: how tall the inset is. Content taller than it is
1323
+ * clipped at its foot, and the inset is never cut across pages: one whose top and height reach
1324
+ * below the room the headers and footers leave, on a page it is on, is an error. Footnotes give
1325
+ * way to it. An error on any other pin.
1326
+ */
1327
+ height?: string;
966
1328
  }
967
1329
  /**
968
1330
  * Markdown as the content of a section, where a layout would go. It holds only Markdown: optional
@@ -1262,6 +1624,12 @@ export interface MarkdownTdAttr {
1262
1624
  * of its text. Layers cannot be nested.
1263
1625
  */
1264
1626
  export interface LayerAttr {
1627
+ /**
1628
+ * Which pages of the section show the layer: each, first, last, odd, even, or a range such as
1629
+ * 2-last. odd and even follow the number printed on the page, so in a section that starts on page
1630
+ * 4 even shows on its first page. first, last and ranges count the section's own pages, whatever
1631
+ * their numbers. Defaults to each.
1632
+ */
1265
1633
  page?: string;
1266
1634
  /**
1267
1635
  * How opaque everything in the layer is, from 0 to 1. To fade one element, put it in a layer of
@@ -1287,6 +1655,27 @@ export interface LayerAttr {
1287
1655
  * The color of the text-at in the layer that sets none of its own. Defaults to the text token.
1288
1656
  */
1289
1657
  color?: string;
1658
+ /**
1659
+ * In a tagged document, one with pdfua or a pdfa of level a, what the layer shows, which a screen
1660
+ * reader reads as one figure at the layer's place in the document: a layer before the layout
1661
+ * before it, one after the layout after it. Without alt a layer is decoration, as a header is,
1662
+ * and a screen reader skips it with all its text: a watermark, a running title, a logo's letters.
1663
+ * A document that is not tagged ignores it.
1664
+ */
1665
+ alt?: string;
1666
+ /**
1667
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1668
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1669
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1670
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1671
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1672
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1673
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1674
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1675
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1676
+ * on in a layers panel.
1677
+ */
1678
+ ocg?: string;
1290
1679
  }
1291
1680
  /**
1292
1681
  * Attributes of the `rect` element in a layer.
@@ -1309,6 +1698,19 @@ export interface RectAttr {
1309
1698
  * with no fill shows the shadow only outside it.
1310
1699
  */
1311
1700
  shadow?: string;
1701
+ /**
1702
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1703
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1704
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1705
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1706
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1707
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1708
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1709
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1710
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1711
+ * on in a layers panel.
1712
+ */
1713
+ ocg?: string;
1312
1714
  }
1313
1715
  /**
1314
1716
  * Attributes of the `circle` element in a layer.
@@ -1339,6 +1741,19 @@ export interface CircleAttr {
1339
1741
  * with no fill shows the shadow only outside it.
1340
1742
  */
1341
1743
  shadow?: string;
1744
+ /**
1745
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1746
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1747
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1748
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1749
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1750
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1751
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1752
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1753
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1754
+ * on in a layers panel.
1755
+ */
1756
+ ocg?: string;
1342
1757
  }
1343
1758
  /**
1344
1759
  * Attributes of the `ellipse` element in a layer.
@@ -1370,6 +1785,19 @@ export interface EllipseAttr {
1370
1785
  * with no fill shows the shadow only outside it.
1371
1786
  */
1372
1787
  shadow?: string;
1788
+ /**
1789
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1790
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1791
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1792
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1793
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1794
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1795
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1796
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1797
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1798
+ * on in a layers panel.
1799
+ */
1800
+ ocg?: string;
1373
1801
  }
1374
1802
  /**
1375
1803
  * Attributes of the `line` element in a layer.
@@ -1383,6 +1811,19 @@ export interface LineAttr {
1383
1811
  strokeWidth?: string;
1384
1812
  strokeDash?: string;
1385
1813
  lineCap?: string;
1814
+ /**
1815
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1816
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1817
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1818
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1819
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1820
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1821
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1822
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1823
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1824
+ * on in a layers panel.
1825
+ */
1826
+ ocg?: string;
1386
1827
  }
1387
1828
  /**
1388
1829
  * Attributes of the `path` element in a layer.
@@ -1395,13 +1836,27 @@ export interface PathAttr {
1395
1836
  strokeWidth?: string;
1396
1837
  strokeDash?: string;
1397
1838
  lineCap?: string;
1839
+ /**
1840
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1841
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1842
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1843
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1844
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1845
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1846
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1847
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1848
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1849
+ * on in a layers panel.
1850
+ */
1851
+ ocg?: string;
1398
1852
  }
1399
1853
  /**
1400
1854
  * Text at a fixed place on the page. It is the text of the layout, with the same defaults: the
1401
1855
  * document's font or Helvetica, 11pt and the text colour. It is one line unless told otherwise;
1402
1856
  * give width to cut it off at a width or to wrap it with max-lines. x and y place its box: the
1403
1857
  * top-left corner, or with anchor, an offset from that point of the page, where the box's matching
1404
- * point goes. {page} and {pages} in it count within the section, and a text that comes from data
1858
+ * point goes. {page} in it prints the page's number and {pages} how many pages its run has, as its
1859
+ * section's page-start, page-format and page-prefix number them, and a text that comes from data
1405
1860
  * belongs in the layout, since a longer text loses its end here without a warning.
1406
1861
  */
1407
1862
  export interface TextAtAttr {
@@ -1444,6 +1899,19 @@ export interface TextAtAttr {
1444
1899
  * and max-lines above 1 wraps the text within it.
1445
1900
  */
1446
1901
  width?: string;
1902
+ /**
1903
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1904
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1905
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1906
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1907
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1908
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1909
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1910
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1911
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1912
+ * on in a layers panel.
1913
+ */
1914
+ ocg?: string;
1447
1915
  }
1448
1916
  /**
1449
1917
  * An image at a fixed place on the page. It needs width or height, and the other follows the
@@ -1459,6 +1927,19 @@ export interface ImgAtAttr {
1459
1927
  anchor?: string;
1460
1928
  width?: string;
1461
1929
  height?: string;
1930
+ /**
1931
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1932
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1933
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1934
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1935
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1936
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1937
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1938
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1939
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1940
+ * on in a layers panel.
1941
+ */
1942
+ ocg?: string;
1462
1943
  }
1463
1944
  /**
1464
1945
  * A barcode at a fixed place on the page. It needs width or height, and the other follows the
@@ -1488,6 +1969,19 @@ export interface BarcodeAtAttr {
1488
1969
  y?: string;
1489
1970
  anchor?: string;
1490
1971
  width?: string;
1972
+ /**
1973
+ * Puts the element, and everything in it, in an optional content group, which the viewer shows or
1974
+ * hides. print: printed, and not shown on screen. screen: shown on screen, and not printed. The
1975
+ * element keeps its room either way, so nothing moves. An element with a group inside an element
1976
+ * with another shows only where both show. Acrobat, Chrome and Firefox switch the groups; Preview
1977
+ * and Safari show everything, on screen and in print. Hidden content is still in the file, where
1978
+ * it can be selected and copied: it is not a way to keep anything secret. A link in print content
1979
+ * is drawn and does nothing, and a form field can't be in print content: use a frame with a
1980
+ * border for a box filled in by hand. With pdfa or pdfua on the output, everything shows. With
1981
+ * pdfx, the file is the print version: screen content stays in it, off, and a reader can turn it
1982
+ * on in a layers panel.
1983
+ */
1984
+ ocg?: string;
1491
1985
  }
1492
1986
  /**
1493
1987
  * The flowing content of a section. Elements stack down the page, and a new page starts when one
@@ -1555,17 +2049,38 @@ export interface FileAttr {
1555
2049
  ref?: string;
1556
2050
  /**
1557
2051
  * The type of the file, such as text/xml, application/pdf or text/csv. Defaults to
1558
- * application/octet-stream, which says only that it is a file.
2052
+ * application/octet-stream, which says only that it is a file, and to text/xml for the invoice of
2053
+ * a Factur-X e-invoice.
1559
2054
  */
1560
2055
  mime?: string;
1561
2056
  /**
1562
2057
  * How the file relates to the document: source, data, alternative, supplement or unspecified, the
1563
- * default. An e-invoice's XML is data.
2058
+ * default. The invoice of a Factur-X e-invoice defaults to data for the MINIMUM and BASIC WL
2059
+ * profiles, and to alternative for the others, as the Factur-X spec asks.
1564
2060
  */
1565
2061
  relationship?: string;
1566
2062
  /** A line about the file, which a reader shows beside its name. */
1567
2063
  description?: string;
1568
2064
  }
2065
+ /**
2066
+ * Declares an ICC color profile that the profile attribute of output names: the profile of the
2067
+ * printing press a PDF/X file is made for, which the printer gives out. The SDK reads the file from
2068
+ * src, or the profile was loaded on the engine under ref or, with no ref, under its own name. The
2069
+ * engine bundles no press profile.
2070
+ */
2071
+ export interface ProfileAttr {
2072
+ /**
2073
+ * The name that the profile attribute of output uses to pick this profile: lowercase letters,
2074
+ * digits and -, starting with a letter.
2075
+ */
2076
+ name: string;
2077
+ /** The key the profile was loaded under on the engine, when that is not its name. */
2078
+ ref?: string;
2079
+ /**
2080
+ * A path the SDK reads the ICC profile from, when the profile was not loaded on the engine.
2081
+ */
2082
+ src?: string;
2083
+ }
1569
2084
  /**
1570
2085
  * One color of a gradient, at an offset along it.
1571
2086
  */
@@ -1613,3 +2128,75 @@ export interface GradientToken {
1613
2128
  */
1614
2129
  stops?: GradientStop[];
1615
2130
  }
2131
+ /**
2132
+ * One set of lines of a ruling, cut by a step or by a count in each direction: x for the lines that
2133
+ * run down the page, y for the lines that run across it. A direction with neither has no lines, so
2134
+ * step-y alone is ruled paper and step both is squared paper. A step and a count in the same
2135
+ * direction is an error. Each set is drawn after the one before it, so a heavier set paints over a
2136
+ * finer one.
2137
+ */
2138
+ export interface RulingLines {
2139
+ /**
2140
+ * The distance between two lines in both directions, a length such as 5mm. step-x and step-y take
2141
+ * its place in their direction. A cell narrower than 2.5pt is an error.
2142
+ */
2143
+ step?: string;
2144
+ /**
2145
+ * The distance between two lines that run down the page, from left to right, a length such as
2146
+ * 10mm.
2147
+ */
2148
+ stepX?: string;
2149
+ /**
2150
+ * The distance between two lines that run across the page, from top to bottom, a length such as
2151
+ * 8mm: ruled paper.
2152
+ */
2153
+ stepY?: string;
2154
+ /**
2155
+ * Cuts the space into this many equal parts in both directions, from 1 to 100, so the lines land
2156
+ * on its edges whatever its size. count-x and count-y take its place in their direction. A part
2157
+ * narrower than 2.5pt is an error.
2158
+ */
2159
+ count?: number;
2160
+ /** Cuts the space into this many equal columns, from 1 to 100. */
2161
+ countX?: number;
2162
+ /** Cuts the space into this many equal rows, from 1 to 100. */
2163
+ countY?: number;
2164
+ /**
2165
+ * The color of the lines: hex, cmyk(), rgb(), hsl() or a color token. Defaults to line-muted.
2166
+ */
2167
+ color?: string;
2168
+ /**
2169
+ * The thickness of the lines, a length or a name from the border row of the tokens. Defaults to
2170
+ * 0.4pt.
2171
+ */
2172
+ thickness?: string;
2173
+ }
2174
+ /**
2175
+ * Lines on every page of a section, for paper to write or draw on, or a grid to place things by:
2176
+ * ruled paper, squared paper, or a page cut into equal parts. A section names it with
2177
+ * ruling="name", and the lines are drawn under everything else on its pages, over the background.
2178
+ * They are decoration, which a screen reader skips.
2179
+ */
2180
+ export interface RulingToken {
2181
+ /**
2182
+ * The space the lines fill and a count divides. page, the default, is the whole page up to its
2183
+ * trim edge. margin is the area inside the margin of the section's layout or markdown. A step
2184
+ * starts at its top left corner, and the lines stop at its edges.
2185
+ */
2186
+ origin?: 'page' | 'margin';
2187
+ /**
2188
+ * Whether the lines on the edges of that space are drawn: the first one, and the last one where a
2189
+ * step lands on the far edge. A count of 12 draws 13 lines with them and 11 without. Defaults to
2190
+ * true.
2191
+ */
2192
+ edges?: boolean;
2193
+ /**
2194
+ * Puts the lines in an optional content group, as ocg does on an element: print, printed and not
2195
+ * shown on screen, or screen, shown on screen and not printed, such as a grid to place things by.
2196
+ */
2197
+ ocg?: 'print' | 'screen';
2198
+ /**
2199
+ * The sets of lines, at least one, drawn in this order: a later set paints over an earlier one.
2200
+ */
2201
+ lines: RulingLines[];
2202
+ }