pdfmake 0.3.0-beta.6 → 0.3.0-beta.8

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 (55) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +1 -1
  3. package/build/pdfmake.js +36523 -36424
  4. package/build/pdfmake.js.map +1 -1
  5. package/build/pdfmake.min.js +2 -2
  6. package/build/pdfmake.min.js.map +1 -1
  7. package/package.json +21 -20
  8. package/src/DocMeasure.js +3 -0
  9. package/src/Printer.js +1 -0
  10. package/src/TableProcessor.js +4 -0
  11. package/src/TextDecorator.js +1 -1
  12. package/src/qrEnc.js +5 -3
  13. package/js/3rd-party/svg-to-pdfkit/source.js +0 -3628
  14. package/js/3rd-party/svg-to-pdfkit.js +0 -7
  15. package/js/DocMeasure.js +0 -624
  16. package/js/DocPreprocessor.js +0 -238
  17. package/js/DocumentContext.js +0 -265
  18. package/js/ElementWriter.js +0 -331
  19. package/js/LayoutBuilder.js +0 -694
  20. package/js/Line.js +0 -105
  21. package/js/OutputDocument.js +0 -76
  22. package/js/OutputDocumentServer.js +0 -27
  23. package/js/PDFDocument.js +0 -144
  24. package/js/PageElementWriter.js +0 -140
  25. package/js/PageSize.js +0 -74
  26. package/js/Printer.js +0 -290
  27. package/js/Renderer.js +0 -375
  28. package/js/SVGMeasure.js +0 -69
  29. package/js/StyleContextStack.js +0 -181
  30. package/js/TableProcessor.js +0 -508
  31. package/js/TextBreaker.js +0 -139
  32. package/js/TextDecorator.js +0 -143
  33. package/js/TextInlines.js +0 -206
  34. package/js/URLResolver.js +0 -73
  35. package/js/base.js +0 -52
  36. package/js/browser-extensions/OutputDocumentBrowser.js +0 -118
  37. package/js/browser-extensions/URLBrowserResolver.js +0 -76
  38. package/js/browser-extensions/fonts/Roboto.js +0 -38
  39. package/js/browser-extensions/index.js +0 -53
  40. package/js/browser-extensions/pdfMake.js +0 -15
  41. package/js/browser-extensions/standard-fonts/Courier.js +0 -38
  42. package/js/browser-extensions/standard-fonts/Helvetica.js +0 -38
  43. package/js/browser-extensions/standard-fonts/Symbol.js +0 -23
  44. package/js/browser-extensions/standard-fonts/Times.js +0 -38
  45. package/js/browser-extensions/standard-fonts/ZapfDingbats.js +0 -23
  46. package/js/browser-extensions/virtual-fs-cjs.js +0 -3
  47. package/js/columnCalculator.js +0 -129
  48. package/js/helpers/node.js +0 -98
  49. package/js/helpers/tools.js +0 -40
  50. package/js/helpers/variableType.js +0 -47
  51. package/js/index.js +0 -15
  52. package/js/qrEnc.js +0 -720
  53. package/js/standardPageSizes.js +0 -56
  54. package/js/tableLayouts.js +0 -98
  55. package/js/virtual-fs.js +0 -60
@@ -1,56 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- var _default = exports.default = {
6
- '4A0': [4767.87, 6740.79],
7
- '2A0': [3370.39, 4767.87],
8
- A0: [2383.94, 3370.39],
9
- A1: [1683.78, 2383.94],
10
- A2: [1190.55, 1683.78],
11
- A3: [841.89, 1190.55],
12
- A4: [595.28, 841.89],
13
- A5: [419.53, 595.28],
14
- A6: [297.64, 419.53],
15
- A7: [209.76, 297.64],
16
- A8: [147.40, 209.76],
17
- A9: [104.88, 147.40],
18
- A10: [73.70, 104.88],
19
- B0: [2834.65, 4008.19],
20
- B1: [2004.09, 2834.65],
21
- B2: [1417.32, 2004.09],
22
- B3: [1000.63, 1417.32],
23
- B4: [708.66, 1000.63],
24
- B5: [498.90, 708.66],
25
- B6: [354.33, 498.90],
26
- B7: [249.45, 354.33],
27
- B8: [175.75, 249.45],
28
- B9: [124.72, 175.75],
29
- B10: [87.87, 124.72],
30
- C0: [2599.37, 3676.54],
31
- C1: [1836.85, 2599.37],
32
- C2: [1298.27, 1836.85],
33
- C3: [918.43, 1298.27],
34
- C4: [649.13, 918.43],
35
- C5: [459.21, 649.13],
36
- C6: [323.15, 459.21],
37
- C7: [229.61, 323.15],
38
- C8: [161.57, 229.61],
39
- C9: [113.39, 161.57],
40
- C10: [79.37, 113.39],
41
- RA0: [2437.80, 3458.27],
42
- RA1: [1729.13, 2437.80],
43
- RA2: [1218.90, 1729.13],
44
- RA3: [864.57, 1218.90],
45
- RA4: [609.45, 864.57],
46
- SRA0: [2551.18, 3628.35],
47
- SRA1: [1814.17, 2551.18],
48
- SRA2: [1275.59, 1814.17],
49
- SRA3: [907.09, 1275.59],
50
- SRA4: [637.80, 907.09],
51
- EXECUTIVE: [521.86, 756.00],
52
- FOLIO: [612.00, 936.00],
53
- LEGAL: [612.00, 1008.00],
54
- LETTER: [612.00, 792.00],
55
- TABLOID: [792.00, 1224.00]
56
- };
@@ -1,98 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.tableLayouts = exports.defaultTableLayout = void 0;
5
- /*eslint no-unused-vars: ["error", {"args": "none"}]*/
6
-
7
- const tableLayouts = exports.tableLayouts = {
8
- noBorders: {
9
- hLineWidth(i) {
10
- return 0;
11
- },
12
- vLineWidth(i) {
13
- return 0;
14
- },
15
- paddingLeft(i) {
16
- return i && 4 || 0;
17
- },
18
- paddingRight(i, node) {
19
- return i < node.table.widths.length - 1 ? 4 : 0;
20
- }
21
- },
22
- headerLineOnly: {
23
- hLineWidth(i, node) {
24
- if (i === 0 || i === node.table.body.length) {
25
- return 0;
26
- }
27
- return i === node.table.headerRows ? 2 : 0;
28
- },
29
- vLineWidth(i) {
30
- return 0;
31
- },
32
- paddingLeft(i) {
33
- return i === 0 ? 0 : 8;
34
- },
35
- paddingRight(i, node) {
36
- return i === node.table.widths.length - 1 ? 0 : 8;
37
- }
38
- },
39
- lightHorizontalLines: {
40
- hLineWidth(i, node) {
41
- if (i === 0 || i === node.table.body.length) {
42
- return 0;
43
- }
44
- return i === node.table.headerRows ? 2 : 1;
45
- },
46
- vLineWidth(i) {
47
- return 0;
48
- },
49
- hLineColor(i) {
50
- return i === 1 ? 'black' : '#aaa';
51
- },
52
- paddingLeft(i) {
53
- return i === 0 ? 0 : 8;
54
- },
55
- paddingRight(i, node) {
56
- return i === node.table.widths.length - 1 ? 0 : 8;
57
- }
58
- }
59
- };
60
- const defaultTableLayout = exports.defaultTableLayout = {
61
- hLineWidth(i, node) {
62
- return 1;
63
- },
64
- vLineWidth(i, node) {
65
- return 1;
66
- },
67
- hLineColor(i, node) {
68
- return 'black';
69
- },
70
- vLineColor(i, node) {
71
- return 'black';
72
- },
73
- hLineStyle(i, node) {
74
- return null;
75
- },
76
- vLineStyle(i, node) {
77
- return null;
78
- },
79
- paddingLeft(i, node) {
80
- return 4;
81
- },
82
- paddingRight(i, node) {
83
- return 4;
84
- },
85
- paddingTop(i, node) {
86
- return 2;
87
- },
88
- paddingBottom(i, node) {
89
- return 2;
90
- },
91
- fillColor(i, node) {
92
- return null;
93
- },
94
- fillOpacity(i, node) {
95
- return 1;
96
- },
97
- defaultBorder: true
98
- };
package/js/virtual-fs.js DELETED
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
- const normalizeFilename = filename => {
6
- if (filename.indexOf(__dirname) === 0) {
7
- filename = filename.substring(__dirname.length);
8
- }
9
- if (filename.indexOf('/') === 0) {
10
- filename = filename.substring(1);
11
- }
12
- return filename;
13
- };
14
- class VirtualFileSystem {
15
- constructor() {
16
- this.storage = {};
17
- }
18
-
19
- /**
20
- * @param {string} filename
21
- * @returns {boolean}
22
- */
23
- existsSync(filename) {
24
- const normalizedFilename = normalizeFilename(filename);
25
- return typeof this.storage[normalizedFilename] !== 'undefined';
26
- }
27
-
28
- /**
29
- * @param {string} filename
30
- * @param {?string|?object} options
31
- * @returns {string|Buffer}
32
- */
33
- readFileSync(filename, options) {
34
- const normalizedFilename = normalizeFilename(filename);
35
- const encoding = typeof options === 'object' ? options.encoding : options;
36
- if (!this.existsSync(normalizedFilename)) {
37
- throw new Error(`File '${normalizedFilename}' not found in virtual file system`);
38
- }
39
- const buffer = this.storage[normalizedFilename];
40
- if (encoding) {
41
- return buffer.toString(encoding);
42
- }
43
- return buffer;
44
- }
45
-
46
- /**
47
- * @param {string} filename
48
- * @param {string|Buffer} content
49
- * @param {?string|?object} options
50
- */
51
- writeFileSync(filename, content, options) {
52
- const normalizedFilename = normalizeFilename(filename);
53
- const encoding = typeof options === 'object' ? options.encoding : options;
54
- if (!content && !options) {
55
- throw new Error('No content');
56
- }
57
- this.storage[normalizedFilename] = encoding || typeof content === 'string' ? new Buffer(content, encoding) : content;
58
- }
59
- }
60
- var _default = exports.default = new VirtualFileSystem();