@docx-editor.dev/docx-to-pdf 2.22.0 → 2.23.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/README.md CHANGED
@@ -14,6 +14,10 @@ Use Node.js 20.16.0 or later in the 20.x release line, or Node.js 22.3.0 or late
14
14
  npm install @docx-editor.dev/docx-to-pdf @docx-editor.dev/core
15
15
  ```
16
16
 
17
+ For Chinese, Japanese, or Korean text, supply suitable fonts or install the optional `@docx-editor.dev/fonts-cjk` package. The converter finds the package without configuration.
18
+
19
+ If you previously relied on bundled CJK coverage, add the optional package to your production dependencies. For installation and deployment details, see [Configure PDF fonts](docs/fonts.md).
20
+
17
21
  ## Convert a document
18
22
 
19
23
  ```ts
@@ -54,7 +58,7 @@ The result includes `bytes`, `pageCount`, `layoutRevision`, `displayMode`, `font
54
58
 
55
59
  Use `fonts` to provide font sources before the installed and packaged sources. Use `fallbackFonts` to add sources after the packaged fonts. The exporter also reads embedded fonts before using a generic substitute for an unresolved family. Use `lastResortFonts` after embedded fonts and before generic substitutes.
56
60
 
57
- `glyphFallbacks` specifies an ordered list of fonts for missing glyphs. The defaults cover symbols, Arabic, CJK, mathematics, and color emoji. Emoji from a COLR font retain their palette colors and extractable text.
61
+ `glyphFallbacks` specifies an ordered list of fonts for missing glyphs. The defaults cover symbols, Arabic, Hebrew, mathematics, and color emoji. They also cover CJK text when `@docx-editor.dev/fonts-cjk` is installed. Emoji from a COLR font retain their palette colors and extractable text.
58
62
 
59
63
  Core's `fontPolicy` controls failed font sources and incomplete face coverage. Generic substitutions can change line breaks and page count, so strict export rejects them with a `font-substitution` diagnostic. Best-effort export uses the substitute and reports it. Inspect `result.fontResolution` for the selected fonts.
60
64
 
@@ -69,14 +73,19 @@ Editing PDF annotations does not update the DOCX.
69
73
  ## Supported content
70
74
 
71
75
  - Searchable multilingual text, small caps, text decorations, and tab leaders.
76
+ - Arabic joining across formatting runs and logical word order for Arabic, Persian, and Hebrew text extraction.
77
+ - Synthetic bold and italic when selected font faces lack those variants.
72
78
  - Static TrueType and CFF fonts, including selected faces from font collections.
73
79
  - Page sizes, page frames, headers, footers, footnotes, and endnotes.
74
80
  - Text and image list markers, paragraph fills, and paragraph borders.
75
81
  - Table text, shading, and resolved borders.
76
82
  - Textboxes and structured equations.
83
+ - Supported vector shapes, horizontal and vertical lines, and outlines that retain their full width.
77
84
  - PNG and JPEG images with cropping, transforms, alpha transparency, and fixed opacity.
78
85
  - Links, destinations, document metadata, and comments.
79
86
 
87
+ The converter reads PNG and JPEG images even when DOCX metadata declares another supported raster format. Supported declarations include PNG, JPEG, GIF, BMP, and WebP.
88
+
80
89
  ## Limitations
81
90
 
82
91
  Charts, rotated table-cell text, unsupported equation fallbacks, advanced image effects, some revision presentation, and non-PNG/JPEG media produce diagnostics. Brightness and grayscale adjustments are not supported.
@@ -25,7 +25,6 @@ so they cannot appear below. Their licenses travel with the package in
25
25
 
26
26
  - `licenses/NotoEmoji-OFL.txt`
27
27
  - `licenses/NotoSansArabic-OFL.txt`
28
- - `licenses/NotoSansCJK-OFL.txt`
29
28
  - `licenses/NotoSansMath-OFL.txt`
30
29
  - `licenses/NotoSansSymbols2-OFL.txt`
31
30
  - `licenses/TwemojiMozilla-LICENSE.md`
@@ -24,15 +24,6 @@
24
24
  "url": "https://raw.githubusercontent.com/google/fonts/main/ofl/notosansarabic/OFL.txt",
25
25
  "sha256": "07fc70bfeb985cc1a87a8587d0a0c80bab11c86c9dc3fd95b6f0cb332f983e96"
26
26
  },
27
- "NotoSansCJKjp-Regular.otf": {
28
- "url": "https://raw.githubusercontent.com/notofonts/noto-cjk/main/Sans/OTF/Japanese/NotoSansCJKjp-Regular.otf",
29
- "sha256": "68a3fc98800b2a27b371f2fb79991daf3633bd89309d4ffaa6946fd587f375b5",
30
- "installedSha256": "68a3fc98800b2a27b371f2fb79991daf3633bd89309d4ffaa6946fd587f375b5"
31
- },
32
- "NotoSansCJK-OFL.txt": {
33
- "url": "https://raw.githubusercontent.com/notofonts/noto-cjk/main/Sans/LICENSE",
34
- "sha256": "6a73f9541c2de74158c0e7cf6b0a58ef774f5a780bf191f2d7ec9cc53efe2bf2"
35
- },
36
27
  "NotoSansSymbols2-Regular.ttf": {
37
28
  "url": "https://raw.githubusercontent.com/google/fonts/main/ofl/notosanssymbols2/NotoSansSymbols2-Regular.ttf",
38
29
  "sha256": "7d5fb73b7ca67a6798101741f5d280a3d016a56a197afcd4199dbb57b4b82a21",