turbo-html2pdf 0.8.2 → 0.8.4
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 +5 -4
- package/index.d.ts +3 -0
- package/index.js +1 -0
- package/package.json +1 -1
- package/src/lib.rs +6 -0
- package/turbo-pdf-napi.darwin-arm64.node +0 -0
- package/turbo-pdf-napi.linux-arm64-gnu.node +0 -0
- package/turbo-pdf-napi.linux-x64-gnu.node +0 -0
- package/turbo-pdf-napi.linux-x64-musl.node +0 -0
- package/turbo-pdf-napi.win32-x64-msvc.node +0 -0
package/README.md
CHANGED
|
@@ -195,16 +195,17 @@ fs.writeFileSync('out.pdf', pdf) // %PDF-1.7
|
|
|
195
195
|
- Raster images (PNG/JPEG, alpha → SMask) with a sane max-size clamp.
|
|
196
196
|
- Watermarks: out-of-the-box faded diagonal **DRAFT** text (word/colour/angle
|
|
197
197
|
configurable) and background-image watermarks.
|
|
198
|
-
-
|
|
199
|
-
|
|
198
|
+
- The Node package enables endnotes, internal cross-references, CMYK print colour,
|
|
199
|
+
PDF/A, PDF/UA, PDF append, AES-256 encryption and post-render stamping.
|
|
200
|
+
The separate `turbo-html2pdf-svg` package adds SVG image support.
|
|
200
201
|
- Deterministic output; `Send + Sync`; no network / no system fonts.
|
|
201
202
|
|
|
202
203
|
## Status
|
|
203
204
|
|
|
204
|
-
`v0.8.
|
|
205
|
+
`v0.8.4` is the release version for npm, PyPI and crates.io; registry
|
|
205
206
|
verification follows the root `PUBLISHING.md`. The core engine is heavily tested (the `turbo-html2pdf-core`
|
|
206
207
|
crate holds 100% line coverage with a cyclomatic-complexity ≤ 5 gate). Bindings:
|
|
207
|
-
Node (
|
|
208
|
+
Node (N-API), WebAssembly and Python (PyO3), plus the Rust MCP server. See [`docs/`](https://github.com/miaskiewicz/turbo-html2pdf/blob/main/docs/) for the full guide and
|
|
208
209
|
[`benches/competitive/`](https://github.com/miaskiewicz/turbo-html2pdf/blob/main/benches/competitive/) for the benchmark harness.
|
|
209
210
|
|
|
210
211
|
## License
|
package/index.d.ts
CHANGED
|
@@ -225,6 +225,9 @@ export interface Program {
|
|
|
225
225
|
hasFooter(): boolean;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
/** Version embedded in the compiled native engine (detects stale local addons). */
|
|
229
|
+
export function version(): string;
|
|
230
|
+
|
|
228
231
|
/** Compile a template into a reusable {@link Program}. Throws `TurboPdfError`. */
|
|
229
232
|
export function compile(templateHtml: string, opts?: CompileOptions): Program;
|
|
230
233
|
|
package/index.js
CHANGED
package/package.json
CHANGED
package/src/lib.rs
CHANGED
|
@@ -41,6 +41,12 @@ use turbo_html2pdf_core::{
|
|
|
41
41
|
|
|
42
42
|
use convert::{build_registry, diagnostics_to_js, JsDiagnostic, JsFont, JsImage, MapResolver};
|
|
43
43
|
|
|
44
|
+
/// Version of the compiled native engine, independent of JavaScript package metadata.
|
|
45
|
+
#[napi]
|
|
46
|
+
pub fn version() -> String {
|
|
47
|
+
env!("CARGO_PKG_VERSION").to_owned()
|
|
48
|
+
}
|
|
49
|
+
|
|
44
50
|
/// Options for a single render pass. All fields are optional; omit what you do
|
|
45
51
|
/// not need. `data` defaults to `null`, `css` to empty, `fonts`/`images` to empty.
|
|
46
52
|
#[napi(object)]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|