pdfmake-rtl 1.3.6 → 2.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.
- package/.vscode/tasks.json +16 -16
- package/CHANGELOG.md +97 -52
- package/README.md +252 -753
- package/build/fonts/Cairo/Cairo-Black.ttf +0 -0
- package/build/fonts/Cairo/Cairo-Bold.ttf +0 -0
- package/build/fonts/Cairo/Cairo-ExtraLight.ttf +0 -0
- package/build/fonts/Cairo/Cairo-Light.ttf +0 -0
- package/build/fonts/Cairo/Cairo-Regular.ttf +0 -0
- package/build/fonts/Cairo/Cairo-SemiBold.ttf +0 -0
- package/build/fonts/Cairo.js +27 -0
- package/build/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/build/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/build/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/build/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/build/fonts/Roboto.js +27 -0
- package/build/pdfmake.js +62972 -70526
- package/build/pdfmake.js.map +1 -1
- package/build/pdfmake.min.js +2 -2
- package/build/pdfmake.min.js.map +1 -1
- package/build/standard-fonts/Courier.js +27 -0
- package/build/standard-fonts/Helvetica.js +27 -0
- package/build/standard-fonts/Symbol.js +21 -0
- package/build/standard-fonts/Times.js +27 -0
- package/build/standard-fonts/ZapfDingbats.js +21 -0
- package/build/vfs_fonts.js +11 -7
- package/build-vfs.js +3 -3
- package/fonts/Cairo/Cairo-Black.ttf +0 -0
- package/fonts/Cairo/Cairo-Bold.ttf +0 -0
- package/fonts/Cairo/Cairo-ExtraLight.ttf +0 -0
- package/fonts/Cairo/Cairo-Light.ttf +0 -0
- package/fonts/Cairo/Cairo-Regular.ttf +0 -0
- package/fonts/Cairo/Cairo-SemiBold.ttf +0 -0
- package/fonts/Cairo.js +8 -0
- package/fonts/Roboto/Roboto-Italic.ttf +0 -0
- package/fonts/Roboto/Roboto-Medium.ttf +0 -0
- package/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
- package/fonts/Roboto/Roboto-Regular.ttf +0 -0
- package/fonts/Roboto.js +8 -0
- package/js/3rd-party/svg-to-pdfkit/source.js +3823 -0
- package/js/3rd-party/svg-to-pdfkit.js +7 -0
- package/js/OutputDocument.js +64 -0
- package/js/OutputDocumentServer.js +29 -0
- package/js/PDFDocument.js +144 -0
- package/js/PageSize.js +74 -0
- package/js/Renderer.js +417 -0
- package/js/TextBreaker.js +166 -0
- package/js/TextInlines.js +244 -0
- package/js/URLResolver.js +43 -0
- package/js/base.js +59 -0
- package/js/browser-extensions/OutputDocumentBrowser.js +82 -0
- package/js/browser-extensions/fonts/Cairo.js +38 -0
- package/js/browser-extensions/fonts/Roboto.js +38 -0
- package/js/browser-extensions/index.js +59 -0
- package/js/browser-extensions/pdfMake.js +3 -0
- package/js/browser-extensions/standard-fonts/Courier.js +38 -0
- package/js/browser-extensions/standard-fonts/Helvetica.js +38 -0
- package/js/browser-extensions/standard-fonts/Symbol.js +23 -0
- package/js/browser-extensions/standard-fonts/Times.js +38 -0
- package/js/browser-extensions/standard-fonts/ZapfDingbats.js +23 -0
- package/js/browser-extensions/virtual-fs-cjs.js +3 -0
- package/js/columnCalculator.js +148 -0
- package/js/docMeasure.js +713 -0
- package/js/docPreprocessor.js +275 -0
- package/js/documentContext.js +310 -0
- package/js/elementWriter.js +687 -0
- package/js/helpers/node.js +123 -0
- package/js/helpers/tools.js +46 -0
- package/js/helpers/variableType.js +59 -0
- package/js/index.js +15 -0
- package/js/layoutBuilder.js +1227 -0
- package/js/line.js +113 -0
- package/js/pageElementWriter.js +161 -0
- package/js/printer.js +351 -0
- package/js/qrEnc.js +721 -0
- package/js/rtlUtils.js +516 -0
- package/js/standardPageSizes.js +56 -0
- package/js/styleContextStack.js +191 -0
- package/js/svgMeasure.js +92 -0
- package/js/tableLayouts.js +98 -0
- package/js/tableProcessor.js +562 -0
- package/js/textDecorator.js +152 -0
- package/js/virtual-fs.js +60 -0
- package/package.json +43 -42
- package/src/3rd-party/svg-to-pdfkit/LICENSE +9 -9
- package/src/3rd-party/svg-to-pdfkit/source.js +229 -36
- package/src/3rd-party/svg-to-pdfkit.js +2 -2
- package/src/OutputDocument.js +64 -0
- package/src/OutputDocumentServer.js +32 -0
- package/src/PDFDocument.js +174 -0
- package/src/PageSize.js +53 -0
- package/src/Renderer.js +445 -0
- package/src/TextBreaker.js +168 -0
- package/src/TextInlines.js +263 -0
- package/src/URLResolver.js +43 -0
- package/src/base.js +70 -0
- package/src/browser-extensions/OutputDocumentBrowser.js +80 -0
- package/src/browser-extensions/fonts/Cairo.js +27 -0
- package/src/browser-extensions/fonts/Roboto.js +27 -0
- package/src/browser-extensions/index.js +61 -0
- package/src/browser-extensions/pdfMake.js +1 -355
- package/src/browser-extensions/standard-fonts/Courier.js +27 -0
- package/src/browser-extensions/standard-fonts/Helvetica.js +27 -0
- package/src/browser-extensions/standard-fonts/Symbol.js +21 -0
- package/src/browser-extensions/standard-fonts/Times.js +27 -0
- package/src/browser-extensions/standard-fonts/ZapfDingbats.js +21 -0
- package/src/browser-extensions/virtual-fs-cjs.js +1 -0
- package/src/columnCalculator.js +35 -38
- package/src/docMeasure.js +635 -643
- package/src/docPreprocessor.js +306 -275
- package/src/documentContext.js +248 -243
- package/src/elementWriter.js +646 -320
- package/src/helpers/node.js +136 -0
- package/src/helpers/tools.js +44 -0
- package/src/helpers/variableType.js +50 -0
- package/src/index.js +16 -0
- package/src/layoutBuilder.js +1393 -1145
- package/src/line.js +106 -88
- package/src/pageElementWriter.js +159 -146
- package/src/printer.js +370 -727
- package/src/qrEnc.js +21 -16
- package/src/rtlUtils.js +500 -540
- package/src/standardPageSizes.js +1 -3
- package/src/styleContextStack.js +181 -111
- package/src/svgMeasure.js +83 -44
- package/src/tableLayouts.js +100 -0
- package/src/tableProcessor.js +498 -484
- package/src/textDecorator.js +136 -118
- package/src/virtual-fs.js +66 -0
- package/standard-fonts/Courier.js +8 -0
- package/standard-fonts/Helvetica.js +8 -0
- package/standard-fonts/Symbol.js +5 -0
- package/standard-fonts/Times.js +8 -0
- package/standard-fonts/ZapfDingbats.js +5 -0
- package/src/browser-extensions/URLBrowserResolver.js +0 -96
- package/src/browser-extensions/virtual-fs.js +0 -55
- package/src/fontProvider.js +0 -68
- package/src/helpers.js +0 -138
- package/src/imageMeasure.js +0 -62
- package/src/pdfKitEngine.js +0 -21
- package/src/textTools.js +0 -391
- package/src/traversalTracker.js +0 -47
package/.vscode/tasks.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "2.0.0",
|
|
3
|
-
"tasks": [
|
|
4
|
-
{
|
|
5
|
-
"label": "run tests",
|
|
6
|
-
"type": "shell",
|
|
7
|
-
"command": "npm",
|
|
8
|
-
"args": [
|
|
9
|
-
"test"
|
|
10
|
-
],
|
|
11
|
-
"problemMatcher": [
|
|
12
|
-
"$eslint-stylish"
|
|
13
|
-
],
|
|
14
|
-
"group": "build"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"label": "run tests",
|
|
6
|
+
"type": "shell",
|
|
7
|
+
"command": "npm",
|
|
8
|
+
"args": [
|
|
9
|
+
"test"
|
|
10
|
+
],
|
|
11
|
+
"problemMatcher": [
|
|
12
|
+
"$eslint-stylish"
|
|
13
|
+
],
|
|
14
|
+
"group": "build"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
17
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,52 +1,97 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- Support for
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
### Improved
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- Fixed
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [2.0.0] - 2026-02-08
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Major version upgrade with significant architectural improvements
|
|
13
|
+
- Full rewrite of RTL processing pipeline for better performance and reliability
|
|
14
|
+
- Support for RTL list tables with proper right-to-left rendering
|
|
15
|
+
- RTL-aware ordered and unordered list handling within table cells
|
|
16
|
+
|
|
17
|
+
### Improved
|
|
18
|
+
|
|
19
|
+
- Overall RTL text rendering quality and consistency
|
|
20
|
+
- Performance optimizations for large documents with mixed LTR/RTL content
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fixed mixed character rendering issues with combined LTR/RTL scripts
|
|
25
|
+
- Fixed mixed language text handling for Arabic, Persian, Urdu alongside Latin characters
|
|
26
|
+
- Corrected bidirectional text reordering in mixed-language paragraphs
|
|
27
|
+
|
|
28
|
+
### Breaking Changes
|
|
29
|
+
|
|
30
|
+
- Major version bump; review migration guide for upgrading from v1.x
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- Major version upgrade with significant architectural improvements
|
|
35
|
+
- Full rewrite of RTL processing pipeline for better performance and reliability
|
|
36
|
+
|
|
37
|
+
### Improved
|
|
38
|
+
|
|
39
|
+
- Overall RTL text rendering quality and consistency
|
|
40
|
+
- Performance optimizations for large documents with mixed LTR/RTL content
|
|
41
|
+
|
|
42
|
+
### Breaking Changes
|
|
43
|
+
|
|
44
|
+
- Major version bump; review migration guide for upgrading from v1.x
|
|
45
|
+
|
|
46
|
+
## [1.3.6] - 2025-08-08
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- Enhanced RTL table handling with improved column reversal for Arabic, Persian, and Urdu text
|
|
51
|
+
- New `reverseTableRowPreserveSpans` function to handle complex table structures with colSpan and rowSpan
|
|
52
|
+
- Automatic RTL detection and processing for tables containing RTL content
|
|
53
|
+
- Support for preserving table header structure in RTL layouts
|
|
54
|
+
- Comprehensive test examples for RTL table scenarios
|
|
55
|
+
|
|
56
|
+
### Improved
|
|
57
|
+
|
|
58
|
+
- Auto-RTL detection logic now respects explicit `supportRTL: false` setting
|
|
59
|
+
- Better handling of nested table headers with mixed span attributes
|
|
60
|
+
- Enhanced RTL text processing with proper bidirectional text support
|
|
61
|
+
- Improved column reversal algorithm that preserves span relationships
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
|
|
65
|
+
- Fixed RTL table header positioning issues with colSpan and rowSpan elements
|
|
66
|
+
- Resolved auto-RTL detection overriding explicit RTL settings
|
|
67
|
+
- Fixed column ordering in complex nested header structures
|
|
68
|
+
- Corrected span placeholder handling in RTL table reversal
|
|
69
|
+
|
|
70
|
+
### Technical Details
|
|
71
|
+
|
|
72
|
+
- Added `processAutoRTLTable` function for intelligent RTL detection
|
|
73
|
+
- Enhanced `rtlUtils.js` with span-aware reversal algorithms
|
|
74
|
+
- Improved error handling for empty object placeholders in span structures
|
|
75
|
+
- Added comprehensive unit tests for RTL table functionality
|
|
76
|
+
|
|
77
|
+
### Examples Added
|
|
78
|
+
|
|
79
|
+
- `examples/rtl-nested-header.js` - Demonstrates complex RTL table with nested headers
|
|
80
|
+
- `examples/test-simple-rtl-table.js` - Basic RTL table functionality test
|
|
81
|
+
- `examples/test-no-spans-rtl-table.js` - RTL table without span elements
|
|
82
|
+
|
|
83
|
+
### Breaking Changes
|
|
84
|
+
|
|
85
|
+
- None. All changes are backward compatible.
|
|
86
|
+
|
|
87
|
+
### Notes
|
|
88
|
+
|
|
89
|
+
- RTL detection threshold set to 30% RTL content for automatic table reversal
|
|
90
|
+
- Headers with span structures are preserved to maintain layout integrity
|
|
91
|
+
- Cell-level RTL text rendering (`bidi: true`) applied automatically for RTL content
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Previous Versions
|
|
96
|
+
|
|
97
|
+
This is the first tracked version of the changelog. For earlier changes, please refer to the git commit history.
|