abstract-document 6.3.2 → 6.4.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/CHANGELOG.md +13 -5
- package/lib/abstract-document/section-elements/table.d.ts +2 -0
- package/lib/abstract-document/section-elements/table.d.ts.map +1 -1
- package/lib/abstract-document/section-elements/table.js +2 -2
- package/lib/abstract-document/section-elements/table.js.map +1 -1
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header.d.ts +3 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header.d.ts.map +1 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header.js +1529 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header.js.map +1 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header2.d.ts +3 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header2.d.ts.map +1 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header2.js +783 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header2.js.map +1 -0
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/simple-table-with-header.d.ts.map +1 -1
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/simple-table-with-header.js +322 -10
- package/lib/abstract-document-exporters/__tests__/pdf/test-defs/simple-table-with-header.js.map +1 -1
- package/lib/abstract-document-exporters/pdf/measure.js +3 -2
- package/lib/abstract-document-exporters/pdf/measure.js.map +1 -1
- package/lib/abstract-document-exporters/pdf/paginate.js +4 -0
- package/lib/abstract-document-exporters/pdf/paginate.js.map +1 -1
- package/lib/abstract-document-exporters/pdf/pre-process.js +8 -0
- package/lib/abstract-document-exporters/pdf/pre-process.js.map +1 -1
- package/lib/abstract-document-exporters/pdf/render.js +4 -5
- package/lib/abstract-document-exporters/pdf/render.js.map +1 -1
- package/package.json +2 -2
- package/src/abstract-document/section-elements/table.ts +6 -11
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Group.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Header and footer.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Header → footer.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed hyperlink and textrun.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed hyperlink → textrun.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed textrun and images.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Mixed textrun → images.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple images.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple tables.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with Center alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with End alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with Start alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Multiple textrun with Start alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Page numbering.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table colSpan and rowSpan.docx and b/package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table colSpan → rowSpan.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table without rows.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Simple table.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single hyperlink.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single image.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Center alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Center alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with End alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with End alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Start alignment that linebreaks.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun with Start alignment.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/Single textrun.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/hello.docx +0 -0
- package/src/abstract-document-exporters/__tests__/docx2/tmp/world.docx +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header.tsx +1555 -0
- package/src/abstract-document-exporters/__tests__/pdf/test-defs/page-break-table-with-header2.tsx +824 -0
- package/src/abstract-document-exporters/__tests__/pdf/test-defs/simple-table-with-header.tsx +482 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Group Paragraphs.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Group Tables.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Group too big for one page.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Header and footer.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Hyperlink internal linktarget.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Hyperlink internal.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Margins header body footer.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed hyperlink and textrun.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed textrun and images.pdf and b/package/src/abstract-document-exporters/__tests__/pdf/tmp/Mixed textrun → images.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple images overflow.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple images.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with Center alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with End alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with Start alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Multiple textrun with Start alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Page numbering.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table row that doesnt fit page.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table single row.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with group.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with header 2.pdf +676 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with header.pdf +3833 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with margin bottom.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with margin top single table.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with margin top.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with rowSpan multipages.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Pagebreak table with rowSpan.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table all auto.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table all fix.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table background.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table cell padding of image.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table cell padding of text.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table center alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table colSpan and rowSpan.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table mix auto fix.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table padding.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table right alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table row alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table text alignment in cell with wrapping.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table text alignment in cell.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with default colored borders.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with header.pdf +226 -22
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with multi colored borders.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Simple table with single colored borders.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single date.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink centered.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink right aligned.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image svg color hex.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image svg color name.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image svg color url.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single image.pdf +0 -0
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Center alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Center alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with End alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with End alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Justify alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Start alignment that linebreaks.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Start alignment.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with super and subscripts.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/Table of content separator.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/hello.pdf +2 -2
- package/src/abstract-document-exporters/__tests__/pdf/tmp/world.pdf +2 -2
- package/src/abstract-document-exporters/pdf/measure.ts +3 -3
- package/src/abstract-document-exporters/pdf/paginate.ts +4 -0
- package/src/abstract-document-exporters/pdf/pre-process.ts +8 -0
- package/src/abstract-document-exporters/pdf/render.ts +4 -5
|
@@ -73,7 +73,7 @@ endobj
|
|
|
73
73
|
(PDFKit)
|
|
74
74
|
endobj
|
|
75
75
|
15 0 obj
|
|
76
|
-
(D:
|
|
76
|
+
(D:20211124154320Z)
|
|
77
77
|
endobj
|
|
78
78
|
12 0 obj
|
|
79
79
|
<<
|
|
@@ -139,7 +139,7 @@ trailer
|
|
|
139
139
|
/Size 16
|
|
140
140
|
/Root 3 0 R
|
|
141
141
|
/Info 12 0 R
|
|
142
|
-
/ID [<
|
|
142
|
+
/ID [<d6b086096c0765c8d2a232ae513fa26f> <d6b086096c0765c8d2a232ae513fa26f>]
|
|
143
143
|
>>
|
|
144
144
|
startxref
|
|
145
145
|
1242
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single hyperlink right aligned.pdf
CHANGED
|
@@ -73,7 +73,7 @@ endobj
|
|
|
73
73
|
(PDFKit)
|
|
74
74
|
endobj
|
|
75
75
|
15 0 obj
|
|
76
|
-
(D:
|
|
76
|
+
(D:20211124154320Z)
|
|
77
77
|
endobj
|
|
78
78
|
12 0 obj
|
|
79
79
|
<<
|
|
@@ -139,7 +139,7 @@ trailer
|
|
|
139
139
|
/Size 16
|
|
140
140
|
/Root 3 0 R
|
|
141
141
|
/Info 12 0 R
|
|
142
|
-
/ID [<
|
|
142
|
+
/ID [<65a369929149695b2357d5862c037fd5> <65a369929149695b2357d5862c037fd5>]
|
|
143
143
|
>>
|
|
144
144
|
startxref
|
|
145
145
|
1228
|
|
@@ -73,7 +73,7 @@ endobj
|
|
|
73
73
|
(PDFKit)
|
|
74
74
|
endobj
|
|
75
75
|
15 0 obj
|
|
76
|
-
(D:
|
|
76
|
+
(D:20211124154320Z)
|
|
77
77
|
endobj
|
|
78
78
|
12 0 obj
|
|
79
79
|
<<
|
|
@@ -139,7 +139,7 @@ trailer
|
|
|
139
139
|
/Size 16
|
|
140
140
|
/Root 3 0 R
|
|
141
141
|
/Info 12 0 R
|
|
142
|
-
/ID [<
|
|
142
|
+
/ID [<43148cb5a48db0565e09b0796b630eb2> <43148cb5a48db0565e09b0796b630eb2>]
|
|
143
143
|
>>
|
|
144
144
|
startxref
|
|
145
145
|
1209
|
|
@@ -108,7 +108,7 @@ endobj
|
|
|
108
108
|
(PDFKit)
|
|
109
109
|
endobj
|
|
110
110
|
13 0 obj
|
|
111
|
-
(D:
|
|
111
|
+
(D:20211124154320Z)
|
|
112
112
|
endobj
|
|
113
113
|
10 0 obj
|
|
114
114
|
<<
|
|
@@ -172,7 +172,7 @@ trailer
|
|
|
172
172
|
/Size 14
|
|
173
173
|
/Root 3 0 R
|
|
174
174
|
/Info 10 0 R
|
|
175
|
-
/ID [<
|
|
175
|
+
/ID [<9adce57fa755143849dd48a753927b54> <9adce57fa755143849dd48a753927b54>]
|
|
176
176
|
>>
|
|
177
177
|
startxref
|
|
178
178
|
1530
|
|
@@ -108,7 +108,7 @@ endobj
|
|
|
108
108
|
(PDFKit)
|
|
109
109
|
endobj
|
|
110
110
|
13 0 obj
|
|
111
|
-
(D:
|
|
111
|
+
(D:20211124154320Z)
|
|
112
112
|
endobj
|
|
113
113
|
10 0 obj
|
|
114
114
|
<<
|
|
@@ -172,7 +172,7 @@ trailer
|
|
|
172
172
|
/Size 14
|
|
173
173
|
/Root 3 0 R
|
|
174
174
|
/Info 10 0 R
|
|
175
|
-
/ID [<
|
|
175
|
+
/ID [<df93e1469e8ee4eb0da13b89d0d12aa7> <df93e1469e8ee4eb0da13b89d0d12aa7>]
|
|
176
176
|
>>
|
|
177
177
|
startxref
|
|
178
178
|
1530
|
|
@@ -154,7 +154,7 @@ endobj
|
|
|
154
154
|
(PDFKit)
|
|
155
155
|
endobj
|
|
156
156
|
18 0 obj
|
|
157
|
-
(D:
|
|
157
|
+
(D:20211124154320Z)
|
|
158
158
|
endobj
|
|
159
159
|
15 0 obj
|
|
160
160
|
<<
|
|
@@ -215,7 +215,7 @@ trailer
|
|
|
215
215
|
/Size 19
|
|
216
216
|
/Root 3 0 R
|
|
217
217
|
/Info 15 0 R
|
|
218
|
-
/ID [<
|
|
218
|
+
/ID [<8f8d03bb31f4c92f80db759f15f1a72e> <8f8d03bb31f4c92f80db759f15f1a72e>]
|
|
219
219
|
>>
|
|
220
220
|
startxref
|
|
221
221
|
1798
|
|
Binary file
|
|
@@ -51,7 +51,7 @@ endobj
|
|
|
51
51
|
(PDFKit)
|
|
52
52
|
endobj
|
|
53
53
|
12 0 obj
|
|
54
|
-
(D:
|
|
54
|
+
(D:20211124154320Z)
|
|
55
55
|
endobj
|
|
56
56
|
9 0 obj
|
|
57
57
|
<<
|
|
@@ -114,7 +114,7 @@ trailer
|
|
|
114
114
|
/Size 13
|
|
115
115
|
/Root 3 0 R
|
|
116
116
|
/Info 9 0 R
|
|
117
|
-
/ID [<
|
|
117
|
+
/ID [<5794634c8a4f2772e355433c2914b54f> <5794634c8a4f2772e355433c2914b54f>]
|
|
118
118
|
>>
|
|
119
119
|
startxref
|
|
120
120
|
1427
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Center alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20211124154320Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<956e3e639128f050a183967cefd7e2fb> <956e3e639128f050a183967cefd7e2fb>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
854
|
|
@@ -51,7 +51,7 @@ endobj
|
|
|
51
51
|
(PDFKit)
|
|
52
52
|
endobj
|
|
53
53
|
12 0 obj
|
|
54
|
-
(D:
|
|
54
|
+
(D:20211124154320Z)
|
|
55
55
|
endobj
|
|
56
56
|
9 0 obj
|
|
57
57
|
<<
|
|
@@ -114,7 +114,7 @@ trailer
|
|
|
114
114
|
/Size 13
|
|
115
115
|
/Root 3 0 R
|
|
116
116
|
/Info 9 0 R
|
|
117
|
-
/ID [<
|
|
117
|
+
/ID [<ecfd9302cc515b70fbcfd09366cb1efd> <ecfd9302cc515b70fbcfd09366cb1efd>]
|
|
118
118
|
>>
|
|
119
119
|
startxref
|
|
120
120
|
1427
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with End alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20211124154320Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<f93aae53ea6bc70272d0e20177f0ad1c> <f93aae53ea6bc70272d0e20177f0ad1c>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
853
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Justify alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20211124154320Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<3683b78eac37afbc7bd98277b3aef4cf> <3683b78eac37afbc7bd98277b3aef4cf>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
848
|
|
@@ -51,7 +51,7 @@ endobj
|
|
|
51
51
|
(PDFKit)
|
|
52
52
|
endobj
|
|
53
53
|
12 0 obj
|
|
54
|
-
(D:
|
|
54
|
+
(D:20211124154320Z)
|
|
55
55
|
endobj
|
|
56
56
|
9 0 obj
|
|
57
57
|
<<
|
|
@@ -114,7 +114,7 @@ trailer
|
|
|
114
114
|
/Size 13
|
|
115
115
|
/Root 3 0 R
|
|
116
116
|
/Info 9 0 R
|
|
117
|
-
/ID [<
|
|
117
|
+
/ID [<f9c7d6851ba22dd9411cbffa27098df3> <f9c7d6851ba22dd9411cbffa27098df3>]
|
|
118
118
|
>>
|
|
119
119
|
startxref
|
|
120
120
|
1418
|
package/src/abstract-document-exporters/__tests__/pdf/tmp/Single textrun with Start alignment.pdf
CHANGED
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20211124154320Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<1515a889e1a7ab6c3b080842b51d9078> <1515a889e1a7ab6c3b080842b51d9078>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
848
|
|
@@ -63,7 +63,7 @@ endobj
|
|
|
63
63
|
(PDFKit)
|
|
64
64
|
endobj
|
|
65
65
|
12 0 obj
|
|
66
|
-
(D:
|
|
66
|
+
(D:20211124154320Z)
|
|
67
67
|
endobj
|
|
68
68
|
9 0 obj
|
|
69
69
|
<<
|
|
@@ -126,7 +126,7 @@ trailer
|
|
|
126
126
|
/Size 13
|
|
127
127
|
/Root 3 0 R
|
|
128
128
|
/Info 9 0 R
|
|
129
|
-
/ID [<
|
|
129
|
+
/ID [<d5d827414bc4b7346a369cfecec66c25> <d5d827414bc4b7346a369cfecec66c25>]
|
|
130
130
|
>>
|
|
131
131
|
startxref
|
|
132
132
|
1076
|
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20211124154320Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<ee0c991f78209c559ad2bf9290ab5cbd> <ee0c991f78209c559ad2bf9290ab5cbd>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
824
|
|
@@ -84,7 +84,7 @@ endobj
|
|
|
84
84
|
(PDFKit)
|
|
85
85
|
endobj
|
|
86
86
|
15 0 obj
|
|
87
|
-
(D:
|
|
87
|
+
(D:20211124154320Z)
|
|
88
88
|
endobj
|
|
89
89
|
12 0 obj
|
|
90
90
|
<<
|
|
@@ -150,7 +150,7 @@ trailer
|
|
|
150
150
|
/Size 16
|
|
151
151
|
/Root 3 0 R
|
|
152
152
|
/Info 12 0 R
|
|
153
|
-
/ID [<
|
|
153
|
+
/ID [<e240d9002d21a37a30ebcd421fb986a3> <e240d9002d21a37a30ebcd421fb986a3>]
|
|
154
154
|
>>
|
|
155
155
|
startxref
|
|
156
156
|
1439
|
|
@@ -79,7 +79,7 @@ endobj
|
|
|
79
79
|
(PDFKit)
|
|
80
80
|
endobj
|
|
81
81
|
15 0 obj
|
|
82
|
-
(D:
|
|
82
|
+
(D:20211124154320Z)
|
|
83
83
|
endobj
|
|
84
84
|
12 0 obj
|
|
85
85
|
<<
|
|
@@ -145,7 +145,7 @@ trailer
|
|
|
145
145
|
/Size 16
|
|
146
146
|
/Root 3 0 R
|
|
147
147
|
/Info 12 0 R
|
|
148
|
-
/ID [<
|
|
148
|
+
/ID [<21816c3e20efc2272ef0b485514d10ea> <21816c3e20efc2272ef0b485514d10ea>]
|
|
149
149
|
>>
|
|
150
150
|
startxref
|
|
151
151
|
1212
|
|
@@ -43,7 +43,7 @@ endobj
|
|
|
43
43
|
(PDFKit)
|
|
44
44
|
endobj
|
|
45
45
|
12 0 obj
|
|
46
|
-
(D:
|
|
46
|
+
(D:20211124154320Z)
|
|
47
47
|
endobj
|
|
48
48
|
9 0 obj
|
|
49
49
|
<<
|
|
@@ -106,7 +106,7 @@ trailer
|
|
|
106
106
|
/Size 13
|
|
107
107
|
/Root 3 0 R
|
|
108
108
|
/Info 9 0 R
|
|
109
|
-
/ID [<
|
|
109
|
+
/ID [<b4e36add613f2271ddea1e998d10d746> <b4e36add613f2271ddea1e998d10d746>]
|
|
110
110
|
>>
|
|
111
111
|
startxref
|
|
112
112
|
837
|
|
@@ -195,8 +195,8 @@ export function measureTable(
|
|
|
195
195
|
const infinityWidth = (tableAvailableWidth - fixedColumnsWidth) / numInfinityColumns;
|
|
196
196
|
const columnWidths = table.columnWidths.map((w) => (isFinite(w) ? w : infinityWidth));
|
|
197
197
|
const desiredSizes = new Map<any, AD.Size.Size>();
|
|
198
|
-
|
|
199
|
-
for (let row of
|
|
198
|
+
const rows = [...table.headerRows, ...table.children];
|
|
199
|
+
for (let row of rows) {
|
|
200
200
|
let column = 0;
|
|
201
201
|
for (let cell of row.children) {
|
|
202
202
|
const cellStyle = AD.Resources.getStyle(
|
|
@@ -229,7 +229,7 @@ export function measureTable(
|
|
|
229
229
|
: table.columnWidths.reduce((a, b) => a + b, style.margins.left + style.margins.right);
|
|
230
230
|
|
|
231
231
|
let desiredHeight = style.margins.top + style.margins.bottom;
|
|
232
|
-
for (let row of
|
|
232
|
+
for (let row of rows) {
|
|
233
233
|
let rowHeight = row.children.map((c) => getDesiredSize(c, desiredSizes).height).reduce((a, b) => Math.max(a, b), 0);
|
|
234
234
|
desiredHeight += rowHeight;
|
|
235
235
|
desiredSizes.set(row, AD.Size.create(desiredWidth, rowHeight));
|
|
@@ -152,6 +152,10 @@ function splitTable(
|
|
|
152
152
|
let tableHead = undefined;
|
|
153
153
|
let tableRest = undefined;
|
|
154
154
|
elementsHeight += table.style.margins.top || 0;
|
|
155
|
+
if (table.headerRows.length > 0) {
|
|
156
|
+
const headerSize = table.headerRows.reduce((acc, row) => (acc += getDesiredSize(row, desiredSizes).height), 0);
|
|
157
|
+
elementsHeight += headerSize;
|
|
158
|
+
}
|
|
155
159
|
|
|
156
160
|
//Find where to split table
|
|
157
161
|
for (const [rowIndex, row] of table.children.entries()) {
|
|
@@ -283,8 +283,15 @@ function toChar(num: number): string {
|
|
|
283
283
|
// }
|
|
284
284
|
|
|
285
285
|
function preProcessTable(table: AD.Table.Table, resources: AD.Resources.Resources): AD.SectionElement.SectionElement {
|
|
286
|
+
const processedHeaders = [];
|
|
286
287
|
const processedChildren = [];
|
|
287
288
|
let rowSpans: Map<number, AD.TableCell.TableCell> = new Map();
|
|
289
|
+
if (table.headerRows) {
|
|
290
|
+
for (const row of table.headerRows) {
|
|
291
|
+
const header = preProcessTableRow(row, rowSpans, resources);
|
|
292
|
+
processedHeaders.push(header);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
288
295
|
for (const row of table.children) {
|
|
289
296
|
const children = preProcessTableRow(row, rowSpans, resources);
|
|
290
297
|
processedChildren.push(children);
|
|
@@ -294,6 +301,7 @@ function preProcessTable(table: AD.Table.Table, resources: AD.Resources.Resource
|
|
|
294
301
|
columnWidths: table.columnWidths,
|
|
295
302
|
styleName: table.styleName,
|
|
296
303
|
style: table.style,
|
|
304
|
+
headerRows: processedHeaders,
|
|
297
305
|
},
|
|
298
306
|
processedChildren
|
|
299
307
|
);
|
|
@@ -629,14 +629,15 @@ function renderTable(
|
|
|
629
629
|
) as AD.TableStyle.TableStyle;
|
|
630
630
|
const availableWidth = finalRect.width;
|
|
631
631
|
let y = finalRect.y + style.margins.top;
|
|
632
|
-
|
|
632
|
+
const rows = [...table.headerRows, ...table.children];
|
|
633
|
+
for (let [index, row] of rows.entries()) {
|
|
633
634
|
const rowSize = getDesiredSize(row, desiredSizes);
|
|
634
635
|
let x = finalRect.x + style.margins.left;
|
|
635
636
|
if (style.alignment === "Center") x += 0.5 * (availableWidth - rowSize.width);
|
|
636
637
|
else if (style.alignment === "Right") x += availableWidth - rowSize.width;
|
|
637
638
|
const rowRect = AD.Rect.create(x, y, rowSize.width, rowSize.height);
|
|
638
639
|
const isTop = index === 0;
|
|
639
|
-
const isBottom = index ===
|
|
640
|
+
const isBottom = index === rows.length - 1;
|
|
640
641
|
renderRow(resources, pdf, desiredSizes, rowRect, style.cellStyle, table, row, index, isTop, isBottom);
|
|
641
642
|
y += rowSize.height;
|
|
642
643
|
}
|
|
@@ -656,7 +657,6 @@ function renderRow(
|
|
|
656
657
|
): void {
|
|
657
658
|
let x = finalRect.x;
|
|
658
659
|
const rowSize = getDesiredSize(row, desiredSizes);
|
|
659
|
-
let cellIndexSpan = 0;
|
|
660
660
|
for (const [cellIndex, cell] of row.children.entries()) {
|
|
661
661
|
if (cell.dummy) {
|
|
662
662
|
const dummySize = getDesiredSize(cell, desiredSizes);
|
|
@@ -667,7 +667,7 @@ function renderRow(
|
|
|
667
667
|
let height = rowSize.height;
|
|
668
668
|
if (cell.rowSpan > 1) {
|
|
669
669
|
for (let index = rowIndex + 1; index < rowIndex + cell.rowSpan; index++) {
|
|
670
|
-
height += getDesiredSize(table.children[index], desiredSizes).height;
|
|
670
|
+
height += getDesiredSize([...table.headerRows, ...table.children][index], desiredSizes).height;
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
const cellSize = getDesiredSize(cell, desiredSizes);
|
|
@@ -676,7 +676,6 @@ function renderRow(
|
|
|
676
676
|
const isLast = cellIndex === row.children.length - 1;
|
|
677
677
|
renderCell(resources, pdf, desiredSizes, cellRect, tableCellStyle, cell, isFirst, isLast, isTop, isBottom);
|
|
678
678
|
x += cellSize.width;
|
|
679
|
-
cellIndexSpan++;
|
|
680
679
|
}
|
|
681
680
|
}
|
|
682
681
|
|