pdfxml 0.1.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.
Files changed (172) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/CONTRIBUTING.md +152 -0
  3. package/LICENSE +201 -0
  4. package/README.md +140 -0
  5. package/dist/index.d.ts +4 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +23 -0
  8. package/dist/lib/common/applyBoxStyle.d.ts +3 -0
  9. package/dist/lib/common/applyBoxStyle.d.ts.map +1 -0
  10. package/dist/lib/common/applyBoxStyle.js +38 -0
  11. package/dist/lib/common/applyTextStyle.d.ts +3 -0
  12. package/dist/lib/common/applyTextStyle.d.ts.map +1 -0
  13. package/dist/lib/common/applyTextStyle.js +46 -0
  14. package/dist/lib/common/calculateTableColumnWidths.d.ts +3 -0
  15. package/dist/lib/common/calculateTableColumnWidths.d.ts.map +1 -0
  16. package/dist/lib/common/calculateTableColumnWidths.js +57 -0
  17. package/dist/lib/common/cmToPt.d.ts +2 -0
  18. package/dist/lib/common/cmToPt.d.ts.map +1 -0
  19. package/dist/lib/common/cmToPt.js +35 -0
  20. package/dist/lib/common/extractTableRows.d.ts +3 -0
  21. package/dist/lib/common/extractTableRows.d.ts.map +1 -0
  22. package/dist/lib/common/extractTableRows.js +43 -0
  23. package/dist/lib/common/getFontName.d.ts +2 -0
  24. package/dist/lib/common/getFontName.d.ts.map +1 -0
  25. package/dist/lib/common/getFontName.js +33 -0
  26. package/dist/lib/common/getMargin.d.ts +8 -0
  27. package/dist/lib/common/getMargin.d.ts.map +1 -0
  28. package/dist/lib/common/getMargin.js +30 -0
  29. package/dist/lib/common/getPadding.d.ts +8 -0
  30. package/dist/lib/common/getPadding.d.ts.map +1 -0
  31. package/dist/lib/common/getPadding.js +31 -0
  32. package/dist/lib/common/getSvgSize.d.ts +5 -0
  33. package/dist/lib/common/getSvgSize.d.ts.map +1 -0
  34. package/dist/lib/common/getSvgSize.js +40 -0
  35. package/dist/lib/common/mergeProps.d.ts +3 -0
  36. package/dist/lib/common/mergeProps.d.ts.map +1 -0
  37. package/dist/lib/common/mergeProps.js +27 -0
  38. package/dist/lib/common/normalize.d.ts +3 -0
  39. package/dist/lib/common/normalize.d.ts.map +1 -0
  40. package/dist/lib/common/normalize.js +67 -0
  41. package/dist/lib/common/parseInlineMarkdown.d.ts +3 -0
  42. package/dist/lib/common/parseInlineMarkdown.d.ts.map +1 -0
  43. package/dist/lib/common/parseInlineMarkdown.js +65 -0
  44. package/dist/lib/common/prepareText.d.ts +3 -0
  45. package/dist/lib/common/prepareText.d.ts.map +1 -0
  46. package/dist/lib/common/prepareText.js +38 -0
  47. package/dist/lib/common/resolveSize.d.ts +2 -0
  48. package/dist/lib/common/resolveSize.d.ts.map +1 -0
  49. package/dist/lib/common/resolveSize.js +42 -0
  50. package/dist/lib/common/truncateWithEllipsis.d.ts +2 -0
  51. package/dist/lib/common/truncateWithEllipsis.d.ts.map +1 -0
  52. package/dist/lib/common/truncateWithEllipsis.js +42 -0
  53. package/dist/lib/constants.d.ts +2 -0
  54. package/dist/lib/constants.d.ts.map +1 -0
  55. package/dist/lib/constants.js +22 -0
  56. package/dist/lib/measure/measureFlex.d.ts +3 -0
  57. package/dist/lib/measure/measureFlex.d.ts.map +1 -0
  58. package/dist/lib/measure/measureFlex.js +91 -0
  59. package/dist/lib/measure/measureImage.d.ts +3 -0
  60. package/dist/lib/measure/measureImage.d.ts.map +1 -0
  61. package/dist/lib/measure/measureImage.js +37 -0
  62. package/dist/lib/measure/measureNode.d.ts +3 -0
  63. package/dist/lib/measure/measureNode.d.ts.map +1 -0
  64. package/dist/lib/measure/measureNode.js +54 -0
  65. package/dist/lib/measure/measureTable.d.ts +3 -0
  66. package/dist/lib/measure/measureTable.d.ts.map +1 -0
  67. package/dist/lib/measure/measureTable.js +46 -0
  68. package/dist/lib/measure/measureTableCell.d.ts +3 -0
  69. package/dist/lib/measure/measureTableCell.d.ts.map +1 -0
  70. package/dist/lib/measure/measureTableCell.js +57 -0
  71. package/dist/lib/measure/measureText.d.ts +3 -0
  72. package/dist/lib/measure/measureText.d.ts.map +1 -0
  73. package/dist/lib/measure/measureText.js +62 -0
  74. package/dist/lib/pdf.d.ts +3 -0
  75. package/dist/lib/pdf.d.ts.map +1 -0
  76. package/dist/lib/pdf.js +106 -0
  77. package/dist/lib/render/measureSvg.d.ts +3 -0
  78. package/dist/lib/render/measureSvg.d.ts.map +1 -0
  79. package/dist/lib/render/measureSvg.js +30 -0
  80. package/dist/lib/render/renderBarCode.d.ts +3 -0
  81. package/dist/lib/render/renderBarCode.d.ts.map +1 -0
  82. package/dist/lib/render/renderBarCode.js +53 -0
  83. package/dist/lib/render/renderFlex.d.ts +3 -0
  84. package/dist/lib/render/renderFlex.d.ts.map +1 -0
  85. package/dist/lib/render/renderFlex.js +148 -0
  86. package/dist/lib/render/renderImage.d.ts +3 -0
  87. package/dist/lib/render/renderImage.d.ts.map +1 -0
  88. package/dist/lib/render/renderImage.js +41 -0
  89. package/dist/lib/render/renderNode.d.ts +3 -0
  90. package/dist/lib/render/renderNode.d.ts.map +1 -0
  91. package/dist/lib/render/renderNode.js +53 -0
  92. package/dist/lib/render/renderPage.d.ts +3 -0
  93. package/dist/lib/render/renderPage.d.ts.map +1 -0
  94. package/dist/lib/render/renderPage.js +36 -0
  95. package/dist/lib/render/renderQrCode.d.ts +3 -0
  96. package/dist/lib/render/renderQrCode.d.ts.map +1 -0
  97. package/dist/lib/render/renderQrCode.js +45 -0
  98. package/dist/lib/render/renderSvg.d.ts +3 -0
  99. package/dist/lib/render/renderSvg.d.ts.map +1 -0
  100. package/dist/lib/render/renderSvg.js +74 -0
  101. package/dist/lib/render/renderTable.d.ts +3 -0
  102. package/dist/lib/render/renderTable.d.ts.map +1 -0
  103. package/dist/lib/render/renderTable.js +159 -0
  104. package/dist/lib/render/renderTableCell.d.ts +3 -0
  105. package/dist/lib/render/renderTableCell.d.ts.map +1 -0
  106. package/dist/lib/render/renderTableCell.js +70 -0
  107. package/dist/lib/render/renderText.d.ts +3 -0
  108. package/dist/lib/render/renderText.d.ts.map +1 -0
  109. package/dist/lib/render/renderText.js +102 -0
  110. package/dist/lib/types/BaseProps.d.ts +51 -0
  111. package/dist/lib/types/BaseProps.d.ts.map +1 -0
  112. package/dist/lib/types/BaseProps.js +20 -0
  113. package/dist/lib/types/FlexAlign.d.ts +2 -0
  114. package/dist/lib/types/FlexAlign.d.ts.map +1 -0
  115. package/dist/lib/types/FlexAlign.js +20 -0
  116. package/dist/lib/types/HorizontalTextAlignment.d.ts +2 -0
  117. package/dist/lib/types/HorizontalTextAlignment.d.ts.map +1 -0
  118. package/dist/lib/types/HorizontalTextAlignment.js +20 -0
  119. package/dist/lib/types/LayoutBox.d.ts +7 -0
  120. package/dist/lib/types/LayoutBox.d.ts.map +1 -0
  121. package/dist/lib/types/LayoutBox.js +20 -0
  122. package/dist/lib/types/LineBreakMode.d.ts +2 -0
  123. package/dist/lib/types/LineBreakMode.d.ts.map +1 -0
  124. package/dist/lib/types/LineBreakMode.js +20 -0
  125. package/dist/lib/types/MarginOptions.d.ts +7 -0
  126. package/dist/lib/types/MarginOptions.d.ts.map +1 -0
  127. package/dist/lib/types/MarginOptions.js +20 -0
  128. package/dist/lib/types/NodeElement.d.ts +7 -0
  129. package/dist/lib/types/NodeElement.d.ts.map +1 -0
  130. package/dist/lib/types/NodeElement.js +20 -0
  131. package/dist/lib/types/PaperFormat.d.ts +12 -0
  132. package/dist/lib/types/PaperFormat.d.ts.map +1 -0
  133. package/dist/lib/types/PaperFormat.js +33 -0
  134. package/dist/lib/types/PdfOptions.d.ts +10 -0
  135. package/dist/lib/types/PdfOptions.d.ts.map +1 -0
  136. package/dist/lib/types/PdfOptions.js +20 -0
  137. package/dist/lib/types/TextSegment.d.ts +7 -0
  138. package/dist/lib/types/TextSegment.d.ts.map +1 -0
  139. package/dist/lib/types/TextSegment.js +20 -0
  140. package/dist/lib/types/TextTransform.d.ts +2 -0
  141. package/dist/lib/types/TextTransform.d.ts.map +1 -0
  142. package/dist/lib/types/TextTransform.js +20 -0
  143. package/dist/lib/types/TextType.d.ts +2 -0
  144. package/dist/lib/types/TextType.d.ts.map +1 -0
  145. package/dist/lib/types/TextType.js +20 -0
  146. package/dist/lib/types/VerticalTextAlignment.d.ts +2 -0
  147. package/dist/lib/types/VerticalTextAlignment.d.ts.map +1 -0
  148. package/dist/lib/types/VerticalTextAlignment.js +20 -0
  149. package/dist/lib/types/index.d.ts +14 -0
  150. package/dist/lib/types/index.d.ts.map +1 -0
  151. package/dist/lib/types/index.js +23 -0
  152. package/dist/program.d.ts +5 -0
  153. package/dist/program.d.ts.map +1 -0
  154. package/dist/program.js +116 -0
  155. package/package.json +76 -0
  156. package/singleton/Courier-Bold.afm +342 -0
  157. package/singleton/Courier-BoldOblique.afm +342 -0
  158. package/singleton/Courier-Oblique.afm +342 -0
  159. package/singleton/Courier.afm +342 -0
  160. package/singleton/Helvetica-Bold.afm +2827 -0
  161. package/singleton/Helvetica-BoldOblique.afm +2827 -0
  162. package/singleton/Helvetica-Oblique.afm +3051 -0
  163. package/singleton/Helvetica.afm +3051 -0
  164. package/singleton/Symbol.afm +213 -0
  165. package/singleton/Times-Bold.afm +2588 -0
  166. package/singleton/Times-BoldItalic.afm +2384 -0
  167. package/singleton/Times-Italic.afm +2667 -0
  168. package/singleton/Times-Roman.afm +2419 -0
  169. package/singleton/ZapfDingbats.afm +225 -0
  170. package/singleton/index.js +101612 -0
  171. package/singleton/sRGB_IEC61966_2_1.icc +0 -0
  172. package/tsconfig.json +12 -0
@@ -0,0 +1,3 @@
1
+ import { LayoutBox, NodeElement } from "../types";
2
+ export declare function renderTableCell(doc: PDFKit.PDFDocument, node: NodeElement, box: LayoutBox): Promise<number>;
3
+ //# sourceMappingURL=renderTableCell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTableCell.d.ts","sourceRoot":"","sources":["../../../lib/render/renderTableCell.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAIjD,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,CAAC,WAAW,EACvB,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,SAAS,GACb,OAAO,CAAC,MAAM,CAAC,CAyEjB"}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.renderTableCell = renderTableCell;
22
+ const applyBoxStyle_1 = require("../common/applyBoxStyle");
23
+ const getPadding_1 = require("../common/getPadding");
24
+ const renderNode_1 = require("./renderNode");
25
+ const renderText_1 = require("./renderText");
26
+ async function renderTableCell(doc, node, box) {
27
+ const padding = (0, getPadding_1.getPadding)(node.props);
28
+ (0, applyBoxStyle_1.applyBoxStyle)(doc, node, box);
29
+ doc.save();
30
+ doc
31
+ .rect(box.x, box.y, box.width, box.height)
32
+ .clip();
33
+ let usedHeight = 0;
34
+ for (const child of node.children) {
35
+ if (typeof child === 'string') {
36
+ const textNode = {
37
+ type: 'Text',
38
+ props: node.props,
39
+ children: [child],
40
+ };
41
+ usedHeight = (0, renderText_1.renderText)(doc, textNode, {
42
+ x: box.x +
43
+ padding.left,
44
+ y: box.y +
45
+ padding.top,
46
+ width: box.width -
47
+ padding.left -
48
+ padding.right,
49
+ height: box.height -
50
+ padding.top -
51
+ padding.bottom,
52
+ });
53
+ continue;
54
+ }
55
+ usedHeight = await (0, renderNode_1.renderNode)(doc, child, {
56
+ x: box.x + padding.left,
57
+ y: box.y + padding.top,
58
+ width: box.width -
59
+ padding.left -
60
+ padding.right,
61
+ height: box.height -
62
+ padding.top -
63
+ padding.bottom,
64
+ });
65
+ }
66
+ doc.restore();
67
+ return (usedHeight +
68
+ padding.top +
69
+ padding.bottom);
70
+ }
@@ -0,0 +1,3 @@
1
+ import { LayoutBox, NodeElement } from "../types";
2
+ export declare function renderText(doc: PDFKit.PDFDocument, node: NodeElement, box: LayoutBox): number;
3
+ //# sourceMappingURL=renderText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderText.d.ts","sourceRoot":"","sources":["../../../lib/render/renderText.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEjD,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,CAAC,WAAW,EACvB,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,SAAS,GACb,MAAM,CA0IR"}
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.renderText = renderText;
22
+ const applyBoxStyle_1 = require("../common/applyBoxStyle");
23
+ const applyTextStyle_1 = require("../common/applyTextStyle");
24
+ const getFontName_1 = require("../common/getFontName");
25
+ const getPadding_1 = require("../common/getPadding");
26
+ const parseInlineMarkdown_1 = require("../common/parseInlineMarkdown");
27
+ const resolveSize_1 = require("../common/resolveSize");
28
+ const truncateWithEllipsis_1 = require("../common/truncateWithEllipsis");
29
+ const constants_1 = require("../constants");
30
+ const measureText_1 = require("../measure/measureText");
31
+ function renderText(doc, node, box) {
32
+ doc.save();
33
+ const baseFont = node.props.FontFamily ||
34
+ 'Helvetica';
35
+ const padding = (0, getPadding_1.getPadding)(node.props);
36
+ const noLineBreak = node.props.NoLineBreak === true;
37
+ const innerX = box.x + padding.left;
38
+ const innerY = box.y +
39
+ padding.top +
40
+ constants_1.TEXT_VERTICAL_OFFSET;
41
+ const resolvedWidth = (0, resolveSize_1.resolveSize)(node.props.Width, box.width);
42
+ const innerWidth = (resolvedWidth ?? box.width)
43
+ - padding.left
44
+ - padding.right;
45
+ (0, applyTextStyle_1.applyTextStyle)(doc, node);
46
+ const finalHeight = (0, measureText_1.measureText)(doc, node, box);
47
+ (0, applyBoxStyle_1.applyBoxStyle)(doc, node, {
48
+ x: box.x,
49
+ y: box.y,
50
+ width: node.props.Width || box.width,
51
+ height: finalHeight,
52
+ });
53
+ const rawText = node.children
54
+ .filter((c) => typeof c === 'string')
55
+ .join(' ');
56
+ const segments = (0, parseInlineMarkdown_1.parseInlineMarkdown)(rawText);
57
+ const align = node.props
58
+ .HorizontalTextAlignment ||
59
+ 'left';
60
+ const characterSpacing = node.props
61
+ .CharacterSpacing || 0;
62
+ const lineGap = node.props.LineHeight || 0;
63
+ const baseOptions = {
64
+ width: innerWidth,
65
+ align,
66
+ lineGap,
67
+ characterSpacing,
68
+ lineBreak: !noLineBreak,
69
+ };
70
+ let first = true;
71
+ for (let i = 0; i < segments.length; i++) {
72
+ const segment = segments[i];
73
+ doc.font((0, getFontName_1.getFontName)(baseFont, segment.bold, segment.italic));
74
+ let text = segment.text;
75
+ if (noLineBreak) {
76
+ text = (0, truncateWithEllipsis_1.truncateWithEllipsis)(doc, text, innerWidth, characterSpacing);
77
+ }
78
+ if (segment.color) {
79
+ doc.fillColor(segment.color);
80
+ }
81
+ else if (node.props.TextColor) {
82
+ doc.fillColor(node.props.TextColor);
83
+ }
84
+ if (first) {
85
+ doc.text(text, innerX, innerY, {
86
+ ...baseOptions,
87
+ continued: i <
88
+ segments.length - 1,
89
+ });
90
+ first = false;
91
+ }
92
+ else {
93
+ doc.text(text, {
94
+ ...baseOptions,
95
+ continued: i <
96
+ segments.length - 1,
97
+ });
98
+ }
99
+ }
100
+ doc.restore();
101
+ return finalHeight;
102
+ }
@@ -0,0 +1,51 @@
1
+ import { FlexAlign } from "./FlexAlign";
2
+ import { HorizontalTextAlignment } from "./HorizontalTextAlignment";
3
+ import { LineBreakMode } from "./LineBreakMode";
4
+ import { TextTransform } from "./TextTransform";
5
+ import { TextType } from "./TextType";
6
+ import { VerticalTextAlignment } from "./VerticalTextAlignment";
7
+ export interface BaseProps {
8
+ AlignItems?: FlexAlign;
9
+ JustifyContent?: FlexAlign;
10
+ Fill?: number;
11
+ Position?: 'relative' | 'absolute';
12
+ Wrap?: boolean;
13
+ AlignSelf?: FlexAlign;
14
+ Basis?: number;
15
+ Grow?: number;
16
+ Shrink?: number;
17
+ FillWidth?: boolean;
18
+ FillHeight?: boolean;
19
+ Width?: number;
20
+ Height?: number;
21
+ Padding?: number;
22
+ Gap?: number;
23
+ CharacterSpacing?: number;
24
+ AutoPageBreak?: boolean;
25
+ FontFamily?: string;
26
+ FontSize?: number;
27
+ NoLineBreak?: boolean;
28
+ HorizontalTextAlignment?: HorizontalTextAlignment;
29
+ VerticalTextAlignment?: VerticalTextAlignment;
30
+ LineBreakMode?: LineBreakMode;
31
+ LineHeight?: number;
32
+ MaxLines?: number;
33
+ TextColor?: string;
34
+ TextTransform?: TextTransform;
35
+ TextType?: TextType;
36
+ BackgroundColor?: string;
37
+ BorderColor?: string;
38
+ BorderWidth?: number;
39
+ BorderRadius?: number;
40
+ ColumnWidths?: number[];
41
+ PaddingTop?: number;
42
+ PaddingRight?: number;
43
+ PaddingBottom?: number;
44
+ PaddingLeft?: number;
45
+ MarginTop?: number;
46
+ MarginRight?: number;
47
+ MarginBottom?: number;
48
+ MarginLeft?: number;
49
+ Value?: string;
50
+ }
51
+ //# sourceMappingURL=BaseProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseProps.d.ts","sourceRoot":"","sources":["../../../lib/types/BaseProps.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAE/D,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IAElC,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;IACjD,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAE7C,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IAEnB,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IAEvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type FlexAlign = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
2
+ //# sourceMappingURL=FlexAlign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlexAlign.d.ts","sourceRoot":"","sources":["../../../lib/types/FlexAlign.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,SAAS,GACjB,YAAY,GACZ,QAAQ,GACR,UAAU,GACV,eAAe,GACf,cAAc,GACd,cAAc,CAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type HorizontalTextAlignment = 'left' | 'center' | 'right' | 'justify';
2
+ //# sourceMappingURL=HorizontalTextAlignment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalTextAlignment.d.ts","sourceRoot":"","sources":["../../../lib/types/HorizontalTextAlignment.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,QAAQ,GACR,OAAO,GACP,SAAS,CAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface LayoutBox {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ //# sourceMappingURL=LayoutBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutBox.d.ts","sourceRoot":"","sources":["../../../lib/types/LayoutBox.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type LineBreakMode = 'word-wrap' | 'char-wrap' | 'clip';
2
+ //# sourceMappingURL=LineBreakMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LineBreakMode.d.ts","sourceRoot":"","sources":["../../../lib/types/LineBreakMode.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,aAAa,GACrB,WAAW,GACX,WAAW,GACX,MAAM,CAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface MarginOptions {
2
+ Top?: string;
3
+ Bottom?: string;
4
+ Left?: string;
5
+ Right?: string;
6
+ }
7
+ //# sourceMappingURL=MarginOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarginOptions.d.ts","sourceRoot":"","sources":["../../../lib/types/MarginOptions.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { BaseProps } from "./BaseProps";
2
+ export interface NodeElement {
3
+ type: string;
4
+ props: BaseProps;
5
+ children: Array<NodeElement | string>;
6
+ }
7
+ //# sourceMappingURL=NodeElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeElement.d.ts","sourceRoot":"","sources":["../../../lib/types/NodeElement.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,CAAA;CACtC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export declare enum PaperFormat {
2
+ A0 = "A0",
3
+ A1 = "A1",
4
+ A2 = "A2",
5
+ A3 = "A3",
6
+ A4 = "A4",
7
+ A5 = "A5",
8
+ A6 = "A6",
9
+ LETTER = "LETTER",
10
+ LEGAL = "LEGAL"
11
+ }
12
+ //# sourceMappingURL=PaperFormat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaperFormat.d.ts","sourceRoot":"","sources":["../../../lib/types/PaperFormat.ts"],"names":[],"mappings":"AAmBA,oBAAY,WAAW;IACrB,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.PaperFormat = void 0;
22
+ var PaperFormat;
23
+ (function (PaperFormat) {
24
+ PaperFormat["A0"] = "A0";
25
+ PaperFormat["A1"] = "A1";
26
+ PaperFormat["A2"] = "A2";
27
+ PaperFormat["A3"] = "A3";
28
+ PaperFormat["A4"] = "A4";
29
+ PaperFormat["A5"] = "A5";
30
+ PaperFormat["A6"] = "A6";
31
+ PaperFormat["LETTER"] = "LETTER";
32
+ PaperFormat["LEGAL"] = "LEGAL";
33
+ })(PaperFormat || (exports.PaperFormat = PaperFormat = {}));
@@ -0,0 +1,10 @@
1
+ import { MarginOptions } from "./MarginOptions";
2
+ import { PaperFormat } from "./PaperFormat";
3
+ export interface PdfOptions {
4
+ Format?: PaperFormat;
5
+ Landscape?: boolean;
6
+ MarginOptions?: MarginOptions;
7
+ Width?: number | string;
8
+ Height?: number | string;
9
+ }
10
+ //# sourceMappingURL=PdfOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PdfOptions.d.ts","sourceRoot":"","sources":["../../../lib/types/PdfOptions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACzB"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface TextSegment {
2
+ text: string;
3
+ bold?: boolean;
4
+ italic?: boolean;
5
+ color?: string;
6
+ }
7
+ //# sourceMappingURL=TextSegment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextSegment.d.ts","sourceRoot":"","sources":["../../../lib/types/TextSegment.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type TextTransform = 'none' | 'uppercase' | 'lowercase' | 'capitalize';
2
+ //# sourceMappingURL=TextTransform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextTransform.d.ts","sourceRoot":"","sources":["../../../lib/types/TextTransform.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,WAAW,GACX,WAAW,GACX,YAAY,CAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type TextType = 'body' | 'title' | 'subtitle' | 'caption';
2
+ //# sourceMappingURL=TextType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextType.d.ts","sourceRoot":"","sources":["../../../lib/types/TextType.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,OAAO,GACP,UAAU,GACV,SAAS,CAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026 josedinizdev
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * https://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ *
15
+ * Author: José Diogo Caetano Diniz
16
+ * GitHub: https://github.com/josedinizdev
17
+ * Project: https://github.com/josedinizdev/PDFXml
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type VerticalTextAlignment = 'top' | 'center' | 'bottom';
2
+ //# sourceMappingURL=VerticalTextAlignment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerticalTextAlignment.d.ts","sourceRoot":"","sources":["../../../lib/types/VerticalTextAlignment.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,qBAAqB,GAC7B,KAAK,GACL,QAAQ,GACR,QAAQ,CAAA"}