pdfmake-rtl 2.0.0 → 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.
Files changed (2) hide show
  1. package/README.md +67 -67
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- [![Node.js CI][githubactions_img]][githubactions_url] -->
2
2
 
3
- # pdfmake-RTL [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url] [![CDNJS][cdnjs_img]][cndjs_url]
3
+ # pdfmake-RTL [![GitHub][github_img]][github_url] [![npm][npm_img]][npm_url]
4
4
 
5
5
  [githubactions_img]: https://github.com/aysnet1/pdfmake-rtl/actions/workflows/node.js.yml/badge.svg?branch=master
6
6
  [githubactions_url]: https://github.com/aysnet1/pdfmake-rtl/actions
@@ -16,6 +16,72 @@
16
16
 
17
17
  All existing PDFMake code works unchanged, with automatic RTL support added!
18
18
 
19
+ ## 🚀 Key Features
20
+
21
+ - ✅ **Automatic RTL Detection** - No need to set `rtl` flags
22
+ - ✅ **Smart Table Column Reversal** - Arabic/Persian/Urdu tables automatically reverse columns
23
+ - ✅ **Unicode Script Detection** - Supports Arabic, Persian, Urdu, and extensions
24
+ - ✅ **Automatic Font Selection** - Uses appropriate fonts per language
25
+ - ✅ **Proper Text Alignment** - RTL text aligns right, LTR text aligns left
26
+ - ✅ **List Bullet Positioning** - Bullets positioned correctly for RTL lists
27
+ - ✅ **Mixed Content Support** - Handles Arabic/Persian/Urdu/English mixed content
28
+ - ✅ **100% PDFMake Compatible** - Drop-in replacement for PDFMake
29
+
30
+ ## 🌐 Live Demo
31
+
32
+ 👉 [View Live Demo on Netlify](https://pdfmake-rtl.netlify.app)
33
+
34
+ PDF document generation library for server-side and client-side in pure JavaScript.
35
+
36
+ Check out [the playground](http://aysnet1.github.io/pdfmake-rtl/playground.html) and [examples](https://github.com/aysnet1/pdfmake-rtl/tree/master/examples).
37
+
38
+ ### Features
39
+
40
+ #### 🔤 RTL Language Support
41
+
42
+ - **Automatic RTL detection** for Arabic, Persian (Farsi), Urdu, and other RTL scripts
43
+ - **Smart table column reversal** — columns automatically reverse for RTL content
44
+ - **Automatic font selection** — uses Cairo font for Arabic, Persian, and Urdu text
45
+ - **Proper text alignment** — RTL text automatically aligns right, LTR aligns left
46
+ - **List bullet positioning** — bullets and numbers positioned correctly for RTL lists
47
+ - **Mixed content handling** — seamlessly handles Arabic/Persian/Urdu/English in the same document
48
+ - **Unicode script detection** — supports Arabic, Persian, Urdu characters and extensions
49
+
50
+ #### 🗒️ Supported RTL Languages
51
+
52
+ | Language | Script | Auto Font |
53
+ | ----------------- | ------- | --------- |
54
+ | Arabic | العربية | Cairo |
55
+ | Persian (Farsi) | فارسی | Cairo |
56
+ | Urdu | اردو | Cairo |
57
+ | Other RTL scripts | — | Cairo |
58
+
59
+ #### 📄 General Features
60
+
61
+ - line-wrapping,
62
+ - text-alignments (left, right, centered, justified),
63
+ - numbered and bulleted lists (with RTL-aware bullet positioning),
64
+ - tables and columns
65
+ - auto/fixed/star-sized widths,
66
+ - col-spans and row-spans,
67
+ - headers automatically repeated in case of a page-break,
68
+ - **automatic column reversal for RTL content**,
69
+ - images and vector graphics,
70
+ - convenient styling and style inheritance,
71
+ - page headers and footers:
72
+ - static or dynamic content,
73
+ - access to current page number and page count,
74
+ - background-layer,
75
+ - page dimensions and orientations,
76
+ - margins,
77
+ - document sections,
78
+ - custom page breaks,
79
+ - font embedding (Cairo font included for RTL support),
80
+ - support for complex, multi-level (nested) structures,
81
+ - table of contents,
82
+ - helper methods for opening/printing/downloading the generated PDF,
83
+ - setting of PDF metadata (e.g. author, subject).
84
+
19
85
  ## 📦 Installation
20
86
 
21
87
  ```bash
@@ -123,72 +189,6 @@ var pdf = pdfmake.createPdf(dd);
123
189
  pdf.write("output.pdf").then(() => console.log("PDF created!"));
124
190
  ```
125
191
 
126
- ## 🚀 Key Features
127
-
128
- - ✅ **Automatic RTL Detection** - No need to set `rtl` flags
129
- - ✅ **Smart Table Column Reversal** - Arabic/Persian/Urdu tables automatically reverse columns
130
- - ✅ **Unicode Script Detection** - Supports Arabic, Persian, Urdu, and extensions
131
- - ✅ **Automatic Font Selection** - Uses appropriate fonts per language
132
- - ✅ **Proper Text Alignment** - RTL text aligns right, LTR text aligns left
133
- - ✅ **List Bullet Positioning** - Bullets positioned correctly for RTL lists
134
- - ✅ **Mixed Content Support** - Handles Arabic/Persian/Urdu/English mixed content
135
- - ✅ **100% PDFMake Compatible** - Drop-in replacement for PDFMake
136
-
137
- ## 🌐 Live Demo
138
-
139
- 👉 [View Live Demo on Netlify](https://pdfmake-rtl.netlify.app)
140
-
141
- PDF document generation library for server-side and client-side in pure JavaScript.
142
-
143
- Check out [the playground](http://aysnet1.github.io/pdfmake-rtl/playground.html) and [examples](https://github.com/aysnet1/pdfmake-rtl/tree/master/examples).
144
-
145
- ### Features
146
-
147
- #### 🔤 RTL Language Support
148
-
149
- - **Automatic RTL detection** for Arabic, Persian (Farsi), Urdu, and other RTL scripts
150
- - **Smart table column reversal** — columns automatically reverse for RTL content
151
- - **Automatic font selection** — uses Cairo font for Arabic, Persian, and Urdu text
152
- - **Proper text alignment** — RTL text automatically aligns right, LTR aligns left
153
- - **List bullet positioning** — bullets and numbers positioned correctly for RTL lists
154
- - **Mixed content handling** — seamlessly handles Arabic/Persian/Urdu/English in the same document
155
- - **Unicode script detection** — supports Arabic, Persian, Urdu characters and extensions
156
-
157
- #### 🗒️ Supported RTL Languages
158
-
159
- | Language | Script | Auto Font |
160
- | ----------------- | ------- | --------- |
161
- | Arabic | العربية | Cairo |
162
- | Persian (Farsi) | فارسی | Cairo |
163
- | Urdu | اردو | Cairo |
164
- | Other RTL scripts | — | Cairo |
165
-
166
- #### 📄 General Features
167
-
168
- - line-wrapping,
169
- - text-alignments (left, right, centered, justified),
170
- - numbered and bulleted lists (with RTL-aware bullet positioning),
171
- - tables and columns
172
- - auto/fixed/star-sized widths,
173
- - col-spans and row-spans,
174
- - headers automatically repeated in case of a page-break,
175
- - **automatic column reversal for RTL content**,
176
- - images and vector graphics,
177
- - convenient styling and style inheritance,
178
- - page headers and footers:
179
- - static or dynamic content,
180
- - access to current page number and page count,
181
- - background-layer,
182
- - page dimensions and orientations,
183
- - margins,
184
- - document sections,
185
- - custom page breaks,
186
- - font embedding (Cairo font included for RTL support),
187
- - support for complex, multi-level (nested) structures,
188
- - table of contents,
189
- - helper methods for opening/printing/downloading the generated PDF,
190
- - setting of PDF metadata (e.g. author, subject).
191
-
192
192
  ## Documentation
193
193
 
194
194
  **Documentation URL: https://pdfmake-rtl.github.io/docs/**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdfmake-rtl",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Enhanced PDFMake with comprehensive RTL (Arabic/Persian/Urdu) support - Production ready package",
5
5
  "main": "js/index.js",
6
6
  "esnext": "src/index.js",