@digicole/pdfmake-rtl 1.0.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/index.js ADDED
@@ -0,0 +1,26 @@
1
+ /**
2
+ * PDFMake RTL - Enhanced PDFMake with automatic RTL support
3
+ *
4
+ * Supports Arabic, Persian (Farsi), and Urdu languages with automatic
5
+ * text direction detection and table column reversal.
6
+ *
7
+ * Main entry point for the package
8
+ */
9
+
10
+ 'use strict';
11
+
12
+ // Export the main PdfPrinter class (same as PDFMake)
13
+ const PdfPrinter = require('./src/printer');
14
+
15
+ // Export RTL utilities for advanced usage
16
+ const RTLUtils = require('./src/rtlUtils');
17
+
18
+ // Export as default (CommonJS)
19
+ module.exports = PdfPrinter;
20
+
21
+ // Export utilities as named exports
22
+ module.exports.RTLUtils = RTLUtils;
23
+ module.exports.PdfPrinter = PdfPrinter;
24
+
25
+ // For ES6 imports compatibility
26
+ module.exports.default = PdfPrinter;
package/package.json ADDED
@@ -0,0 +1,124 @@
1
+ {
2
+ "name": "@digicole/pdfmake-rtl",
3
+ "version": "1.0.0",
4
+ "description": "Enhanced PDFMake with automatic RTL (Arabic/Persian/Urdu) support - Complete standalone package",
5
+ "main": "index.js",
6
+ "browser": "build/pdfmake.js",
7
+ "directories": {
8
+ "test": "tests",
9
+ "examples": "examples"
10
+ },
11
+ "dependencies": {
12
+ "@foliojs-fork/linebreak": "^1.1.2",
13
+ "@foliojs-fork/pdfkit": "^0.15.3",
14
+ "iconv-lite": "^0.6.3",
15
+ "xmldoc": "^2.0.1"
16
+ },
17
+ "devDependencies": {
18
+ "@babel/cli": "^7.27.2",
19
+ "@babel/core": "^7.27.1",
20
+ "@babel/plugin-transform-modules-commonjs": "^7.27.1",
21
+ "@babel/preset-env": "^7.27.2",
22
+ "@eslint/js": "^9.26.0",
23
+ "assert": "^2.1.0",
24
+ "babel-loader": "^10.0.0",
25
+ "brfs": "^2.0.2",
26
+ "browserify-zlib": "^0.2.0",
27
+ "buffer": "^6.0.3",
28
+ "core-js": "3.19.0",
29
+ "eslint": "^9.26.0",
30
+ "eslint-plugin-jsdoc": "^50.6.11",
31
+ "expose-loader": "^5.0.1",
32
+ "file-saver": "^2.0.5",
33
+ "globals": "^16.1.0",
34
+ "mocha": "^11.2.2",
35
+ "npm-run-all": "^4.1.5",
36
+ "process": "^0.11.10",
37
+ "rewire": "^7.0.0",
38
+ "shx": "^0.4.0",
39
+ "sinon": "^20.0.0",
40
+ "source-map-loader": "^5.0.0",
41
+ "stream-browserify": "^3.0.0",
42
+ "string-replace-webpack-plugin": "^0.1.3",
43
+ "svg-to-pdfkit": "^0.1.8",
44
+ "terser-webpack-plugin": "^5.3.14",
45
+ "transform-loader": "^0.2.4",
46
+ "util": "^0.12.5",
47
+ "webpack": "^5.99.8",
48
+ "webpack-cli": "^6.0.1"
49
+ },
50
+ "engines": {
51
+ "node": ">=18"
52
+ },
53
+ "scripts": {
54
+ "test": "run-s build mocha",
55
+ "test-package": "node test-package.js",
56
+ "prepublishOnly": "npm run test-package && echo 'Package ready for publishing'",
57
+ "build": "run-s build:3rdparty build:browser",
58
+ "build:3rdparty": "shx cp node_modules/svg-to-pdfkit/source.js src/3rd-party/svg-to-pdfkit/source.js && shx cp node_modules/svg-to-pdfkit/LICENSE src/3rd-party/svg-to-pdfkit/LICENSE",
59
+ "build:browser": "webpack",
60
+ "build:browser-standard-fonts": "webpack --config webpack-standardfonts.config.js",
61
+ "build:vfs": "node build-vfs.js \"./examples/fonts\"",
62
+ "build:examples": "node build-examples.js",
63
+ "lint": "eslint \"./src/**/*.js\" \"./tests/**/*.js\" \"./examples/**/*.js\"",
64
+ "mocha": "mocha --reporter spec \"./tests/**/*.js\"",
65
+ "playground": "node dev-playground/server.js"
66
+ },
67
+ "repository": {
68
+ "type": "git",
69
+ "url": "git+https://github.com/aysnet1/pdfmake-rtl.git"
70
+ },
71
+ "bugs": {
72
+ "url": "https://github.com/aysnet1/pdfmake-rtl/issues"
73
+ },
74
+ "homepage": "https://github.com/aysnet1/pdfmake-rtl#readme",
75
+ "rtlFeatures": {
76
+ "automaticTableColumnReversal": true,
77
+ "arabicTextSupport": true,
78
+ "hebrewTextSupport": true,
79
+ "bidirectionalTextProcessing": true,
80
+ "unicodeRanges": [
81
+ "0x0590-0x05FF",
82
+ "0x0600-0x06FF",
83
+ "0x0750-0x077F",
84
+ "0xFB1D-0xFB4F",
85
+ "0xFE70-0xFEFF"
86
+ ]
87
+ },
88
+ "keywords": [
89
+ "pdf",
90
+ "javascript",
91
+ "printing",
92
+ "layout",
93
+ "rtl",
94
+ "arabic",
95
+ "Persian",
96
+ "Urdu",
97
+ "right-to-left",
98
+ "bidirectional",
99
+ "i18n",
100
+ "localization",
101
+ "automatic-detection",
102
+ "unicode",
103
+ "middle-east",
104
+ "document-generation"
105
+ ],
106
+ "author": "Aycer(based on original PDFMake by Bartek Pampuch)",
107
+ "contributors": [
108
+ {
109
+ "name": "Bartek Pampuch",
110
+ "email": "bartosz.pampuch@gmail.com",
111
+ "url": "https://github.com/bpampuch"
112
+ }
113
+ ],
114
+ "license": "MIT",
115
+ "config": {
116
+ "blanket": {
117
+ "pattern": "src",
118
+ "data-cover-never": [
119
+ "node_modules",
120
+ "tests"
121
+ ]
122
+ }
123
+ }
124
+ }
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 SVG-to-PDFKit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.