pd4ml 1.0.0 → 1.0.1
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 +3 -3
- package/docs/guide.md +7 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,11 +5,11 @@ HTML and CSS to **PDF**, **PDF/A**, **PDF/UA**, **ZUGFeRD/Factur-X**, **DOCX**,
|
|
|
5
5
|
available to Node.js applications. New converters use PD4ML's **v42 layout engine** by default.
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
npm install
|
|
8
|
+
npm install pd4ml
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
The package is on npm (<https://www.npmjs.com/package/pd4ml>); its contents and releases are also
|
|
12
|
+
on GitHub (<https://github.com/zxfr/pd4ml-node>).
|
|
13
13
|
|
|
14
14
|
```js
|
|
15
15
|
const { PD4ML, PageSize, PageMargins, Units, PdfSpec } = require('pd4ml');
|
package/docs/guide.md
CHANGED
|
@@ -46,17 +46,13 @@ containers, use an image with both Node and Java, or add a JRE to the Node image
|
|
|
46
46
|
### 2.1 Install the module
|
|
47
47
|
|
|
48
48
|
```
|
|
49
|
-
npm install
|
|
49
|
+
npm install pd4ml
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
npm install https://github.com/zxfr/pd4ml-node/releases/download/v1.0.0/pd4ml-1.0.0.tgz
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Either way the module is named `pd4ml` (`require('pd4ml')`, `import ... from 'pd4ml'`).
|
|
52
|
+
The package is published on npm as [`pd4ml`](https://www.npmjs.com/package/pd4ml). The same
|
|
53
|
+
package is on GitHub, <https://github.com/zxfr/pd4ml-node>, with each version's `.tgz` attached
|
|
54
|
+
to its [release](https://github.com/zxfr/pd4ml-node/releases); `npm install github:zxfr/pd4ml-node`
|
|
55
|
+
installs it from there.
|
|
60
56
|
|
|
61
57
|
This installs the module, its TypeScript declarations and the `pd4ml` command (`npx pd4ml ...`).
|
|
62
58
|
The module has no npm dependencies.
|
|
@@ -541,6 +537,7 @@ pd.renderAsImages('pages', 'page', Constants.PNG24); // page files in a
|
|
|
541
537
|
```
|
|
542
538
|
|
|
543
539
|
The image formats are `PNG8`, `PNG24`, `TIFF` and `TIFF_COMPRESSED` (constants in `Constants`).
|
|
540
|
+
The TIFF formats need Java 9 or later.
|
|
544
541
|
The v42 engine does not support the multi-page TIFF formats yet; use the v40 engine for them.
|
|
545
542
|
|
|
546
543
|
With the v42 engine, DOCX/RTF output can be made *editable*: positioned content becomes text
|
|
@@ -744,6 +741,7 @@ Without a license, PD4ML is fully functional but marks its output. See
|
|
|
744
741
|
| Output is watermarked | No license is installed ([licensing](https://pd4ml.com/docs/#3.-licensing)). |
|
|
745
742
|
| Squares instead of characters | The fonts lack those glyphs. Provide fonts with `useTTF` ([fonts](https://pd4ml.com/docs/#9.-fonts-bookmarks-and-hyperlinks)). |
|
|
746
743
|
| `NoClassDefFoundError: org/bouncycastle/...` with `setPermissions` | The Bouncy Castle jars are missing. Install without `--no-bouncycastle`, or add them to the classpath. |
|
|
744
|
+
| `NoClassDefFoundError: com/sun/media/jai/...` with `renderAsImages` / `renderPng` | PD4ML 4.1.1 and earlier need the Java Advanced Imaging jars for page images. Use a newer PD4ML build, or add `jai-core` and `jai-codec` 1.1.3 (from the JBoss Maven repository) to the classpath. |
|
|
747
745
|
| Warning "has no v42 layout engine" | The PD4ML build predates 4.2, so the conversion uses its own engine. Use a 4.2 build for v42. |
|
|
748
746
|
| `JavaError: ... NoSuchMethodException` | No Java method of that name takes those argument types. Check [api.md](api.md); pass floats with `Java.float(10)`, binary data as a `Buffer`. |
|
|
749
747
|
|