pdfmake 0.1.71 → 0.1.72

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/build-vfs.js ADDED
@@ -0,0 +1,44 @@
1
+ const fs = require('fs');
2
+
3
+ const vfsBefore = "this.pdfMake = this.pdfMake || {}; this.pdfMake.vfs = ";
4
+ const vfsAfter = ";";
5
+ const sourcePath = process.argv[2];
6
+ const vfsFilename = process.argv[3] ? process.argv[2] : './build/vfs_fonts.js';
7
+
8
+ var vfs = {};
9
+
10
+ if (sourcePath === undefined) {
11
+ console.error('Usage: node build-vfs.js path [filename]');
12
+ console.log('');
13
+ console.log('Parameters:');
14
+ console.log(' path Source path with fonts.');
15
+ console.log(' filename Optional. Output vfs file. Default: ./build/vfs_fonts.js');
16
+ console.log('');
17
+ console.log('Examples:');
18
+ console.log(' node build-vfs.js "examples/fonts"');
19
+ console.log(' node build-vfs.js "examples/fonts" "./build/vfs_fonts.js"');
20
+ return;
21
+ }
22
+
23
+ if (!fs.existsSync(sourcePath)) {
24
+ console.error('Source path "' + sourcePath + '" not found.');
25
+ return;
26
+ }
27
+
28
+ console.log('Source path:', sourcePath);
29
+ console.log('');
30
+
31
+ var files = fs.readdirSync(sourcePath);
32
+
33
+ files.forEach(function (file) {
34
+ var fileBase64 = fs.readFileSync(sourcePath + '/' + file).toString('base64');
35
+ console.log('FILE:', file);
36
+
37
+ vfs[file] = fileBase64;
38
+ });
39
+
40
+ const vfsFileContent = vfsBefore + JSON.stringify(vfs, null, 2) + vfsAfter;
41
+ fs.writeFileSync(vfsFilename, vfsFileContent);
42
+
43
+ console.log('');
44
+ console.log('Builded ' + files.length + ' files to ' + vfsFilename + '.');
package/package.json CHANGED
@@ -1,74 +1,75 @@
1
- {
2
- "name": "pdfmake",
3
- "version": "0.1.71",
4
- "description": "Client/server side PDF printing in pure JavaScript",
5
- "main": "src/printer.js",
6
- "browser": "build/pdfmake.js",
7
- "directories": {
8
- "test": "tests"
9
- },
10
- "dependencies": {
11
- "iconv-lite": "^0.6.2",
12
- "linebreak": "^1.0.2",
13
- "pdfkit": "^0.12.0",
14
- "svg-to-pdfkit": "^0.1.8",
15
- "xmldoc": "^1.1.2"
16
- },
17
- "devDependencies": {
18
- "@babel/core": "^7.12.10",
19
- "@babel/plugin-transform-modules-commonjs": "^7.12.1",
20
- "@babel/preset-env": "^7.12.11",
21
- "babel-loader": "^8.2.2",
22
- "brfs": "^2.0.2",
23
- "core-js": "^3.8.1",
24
- "eslint-plugin-jsdoc": "^30.7.9",
25
- "expose-loader": "^1.0.3",
26
- "fancy-log": "^1.3.3",
27
- "file-saver": "^2.0.5",
28
- "gulp": "^4.0.2",
29
- "gulp-each": "^0.5.0",
30
- "gulp-eslint": "^6.0.0",
31
- "gulp-file-contents-to-json": "^0.2.2",
32
- "gulp-spawn-mocha": "^6.0.0",
33
- "mocha": "7.2.0",
34
- "rewire": "^5.0.0",
35
- "sinon": "^9.2.2",
36
- "string-replace-webpack-plugin": "^0.1.3",
37
- "terser-webpack-plugin": "2.3.8",
38
- "transform-loader": "^0.2.4",
39
- "webpack": "^4.44.2"
40
- },
41
- "engines": {
42
- "node": ">=8"
43
- },
44
- "scripts": {
45
- "build": "gulp build",
46
- "test": "gulp",
47
- "playground": "node dev-playground/server.js"
48
- },
49
- "repository": {
50
- "type": "git",
51
- "url": "git://github.com/bpampuch/pdfmake.git"
52
- },
53
- "keywords": [
54
- "pdf",
55
- "javascript",
56
- "printing",
57
- "layout"
58
- ],
59
- "author": "Bartek Pampuch <bartosz.pampuch@gmail.com>",
60
- "license": "MIT",
61
- "bugs": {
62
- "url": "https://github.com/bpampuch/pdfmake/issues"
63
- },
64
- "homepage": "http://pdfmake.org",
65
- "config": {
66
- "blanket": {
67
- "pattern": "src",
68
- "data-cover-never": [
69
- "node_modules",
70
- "tests"
71
- ]
72
- }
73
- }
74
- }
1
+ {
2
+ "name": "pdfmake",
3
+ "version": "0.1.72",
4
+ "description": "Client/server side PDF printing in pure JavaScript",
5
+ "main": "src/printer.js",
6
+ "browser": "build/pdfmake.js",
7
+ "directories": {
8
+ "test": "tests"
9
+ },
10
+ "dependencies": {
11
+ "iconv-lite": "^0.6.2",
12
+ "linebreak": "^1.0.2",
13
+ "pdfkit": "^0.12.0",
14
+ "svg-to-pdfkit": "^0.1.8",
15
+ "xmldoc": "^1.1.2"
16
+ },
17
+ "devDependencies": {
18
+ "@babel/core": "^7.12.10",
19
+ "@babel/plugin-transform-modules-commonjs": "^7.12.1",
20
+ "@babel/preset-env": "^7.12.11",
21
+ "babel-loader": "^8.2.2",
22
+ "brfs": "^2.0.2",
23
+ "core-js": "^3.8.1",
24
+ "eslint-plugin-jsdoc": "^30.7.9",
25
+ "expose-loader": "^1.0.3",
26
+ "fancy-log": "^1.3.3",
27
+ "file-saver": "^2.0.5",
28
+ "gulp": "^4.0.2",
29
+ "gulp-each": "^0.5.0",
30
+ "gulp-eslint": "^6.0.0",
31
+ "gulp-file-contents-to-json": "^0.2.2",
32
+ "gulp-spawn-mocha": "^6.0.0",
33
+ "mocha": "7.2.0",
34
+ "rewire": "^5.0.0",
35
+ "sinon": "^9.2.2",
36
+ "string-replace-webpack-plugin": "^0.1.3",
37
+ "terser-webpack-plugin": "2.3.8",
38
+ "transform-loader": "^0.2.4",
39
+ "webpack": "^4.44.2"
40
+ },
41
+ "engines": {
42
+ "node": ">=8"
43
+ },
44
+ "scripts": {
45
+ "build": "gulp build",
46
+ "build:vfs": "node build-vfs.js \"./examples/fonts\"",
47
+ "test": "gulp",
48
+ "playground": "node dev-playground/server.js"
49
+ },
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git://github.com/bpampuch/pdfmake.git"
53
+ },
54
+ "keywords": [
55
+ "pdf",
56
+ "javascript",
57
+ "printing",
58
+ "layout"
59
+ ],
60
+ "author": "Bartek Pampuch <bartosz.pampuch@gmail.com>",
61
+ "license": "MIT",
62
+ "bugs": {
63
+ "url": "https://github.com/bpampuch/pdfmake/issues"
64
+ },
65
+ "homepage": "http://pdfmake.org",
66
+ "config": {
67
+ "blanket": {
68
+ "pattern": "src",
69
+ "data-cover-never": [
70
+ "node_modules",
71
+ "tests"
72
+ ]
73
+ }
74
+ }
75
+ }