Sitelet https://github.com/fullbleed-engine/docs/pull/37/files
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/assets/node/project.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"package_version": "0.1.2",
"package_version": "0.1.3",
"engine_version": "2.5.6",
"source_commit": "efcc5afbf3bbd37894194472e35dea209a54ec0f",
"package_url": "https://github.com/fullbleed-engine/fullbleed-node/releases/download/v0.1.2/fullbleed-0.1.2.tgz",
"package_integrity": "sha512-mAwvG4R4YgXPW0b5dT/ne7HUTBUKQcmwaDkvtYPK/bMkBhoU/mTGXQFjh4AwLCv0aWV2vgNpmguhgGW48iDKHQ==",
"package_sha256": "df08fc22c578f2653bed4adc5cf9ac66603bfeb34aa6b8812ebe3cbeb842933f",
"source_commit": "2fb8e9f67024fb66a5496879e63b523b74d9fcc6",
"package_url": "https://github.com/fullbleed-engine/fullbleed-node/releases/download/v0.1.3/fullbleed-0.1.3.tgz",
"package_integrity": "sha512-0X05ow1By4yS/CaiCUGar6xlRc21flrILDSrTkIMe8hr7wzwBpaFmHAb1wXONWreoA3QRuA1dDhISVDHJecujg==",
"package_sha256": "2dec677856edd8c687a5442b43f5f4be7b04d5da0251fff36106dd0af59af47e",
"rendered": {
"invoice.pdf": "e09514ad458c62f9f9ef5df76168717b78b20ed365e892118f7aff6a4492e34b",
"invoice.png": "b76f6db748fb47b928c93c12fe788de94a0f5d8da4bb350f644a58705c163cf7"
Expand All @@ -15,7 +15,7 @@
},
"fictional_data": true,
"license": "MIT",
"verification_scope": "Reviewed invoice and quickstart, installed from the published GitHub package. No PDF standards certification.",
"verification_scope": "Reviewed invoice and quickstart, installed from the published npm package. No PDF standards certification.",
"report": {
"report.pdf": "a93e4df3f5af6cc010e0611f95c4c24588d0d27627d1571daddec4eb92b31105",
"report-2.png": "3e31e42b3c7cac8b01633e5675cb1446feec553afb392d4d6a7b73f8c8582ad9"
Expand All @@ -27,7 +27,7 @@
},
"README.md": {
"bytes": 902,
"sha256": "12f9720d0c3a45c78abada2a45eef5e32f9ba8ca461fde4aa6141d529f56329d"
"sha256": "b075935d47a26f9ad109698f8cf117e35228f46f9e65803ab0fd3d9ebf9ae3f7"
},
"invoice.css": {
"bytes": 3546,
Expand All @@ -39,16 +39,16 @@
},
"package-lock.json": {
"bytes": 1075,
"sha256": "38d6bf751b44d45a80321dc028601111512572d6e45d89a6b16300e5f1278284"
"sha256": "d3fcc0d1f211a207f22f3e224d6b0f93bba73f1d3cd653121c3671d82d6decea"
},
"package.json": {
"bytes": 241,
"sha256": "e66c93ef51a9057492db8f601771f1c4f8a4d460c5f497fcc02ea875b5bc5e01"
"sha256": "d1a099e7985fb444b131340471e7ba454d85d29df7eec39843120c135beec77c"
},
"render.mjs": {
"bytes": 1064,
"sha256": "dd63e83658800df2672c8c5ca1b176dbe49fc0d5c49b8c2b79af91515a68e776"
}
},
"zip_sha256": "44a337e3a336e1e945ab44438797a8569c7b330a1a742c35bd4c106261fe2b5e"
"zip_sha256": "c004c8f4d629fe754877aaac96579301d5d3fb758ecedb73a0fab600bf3f2b35"
}
Binary file modified docs/assets/node/project.zip
Binary file not shown.
22 changes: 14 additions & 8 deletions docs/getting-started/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Fullbleed's optional Node package renders static HTML/CSS into PDFs using a
bundled WebAssembly build of the Rust engine. It includes fonts and runs locally;
you do not need Python, Rust, or a browser to use the installed package.

This guide uses **Node package 0.1.2**, powered by **Fullbleed 2.5.6**. The
This guide uses **Node package 0.1.3**, powered by **Fullbleed 2.5.6**. The
integration and core engine have separate versions.

## Create your first PDF
Expand All @@ -19,7 +19,7 @@ With Node.js 22 or newer, install the [npm package](https://www.npmjs.com/packag
npm install fullbleed
```

To pin this guide's version, use `npm install --save-exact fullbleed@0.1.2`.
To pin this guide's version, use `npm install --save-exact fullbleed@0.1.3`.
The npm package contains the same verified bytes as the GitHub release.

Save this as `invoice.mjs` and run `node invoice.mjs`:
Expand Down Expand Up @@ -77,7 +77,7 @@ of the finalized PDF. Fullbleed 2.5.5 fixes gradient fills that were missing fro
these PNG previews in earlier releases.

[Open the report PDF](../assets/node/report.pdf){ .md-button }
[Explore its HTML and CSS](https://github.com/fullbleed-engine/fullbleed-node/tree/v0.1.2/examples){ .md-button }
[Explore its HTML and CSS](https://github.com/fullbleed-engine/fullbleed-node/tree/v0.1.3/examples){ .md-button }

## Bring fonts and image assets

Expand All @@ -88,7 +88,7 @@ in CSS. Pass images through `assets`, mapping relative names to `Buffer` or

The engine uses an in-memory filesystem for the supplied inputs and does not
fetch remote URLs. Data URIs also work for document images. The
[package API reference](https://github.com/fullbleed-engine/fullbleed-node/tree/v0.1.2#fonts-and-assets)
[package API reference](https://github.com/fullbleed-engine/fullbleed-node/tree/v0.1.3#fonts-and-assets)
includes a complete font and asset example.

## Use it in an application
Expand All @@ -98,6 +98,11 @@ It includes an App Router handler, designed invoice, bundled-asset configuration
and an isolated check of the production standalone server.

Rendering runs in a worker, with separate document state for concurrent calls.
The promise waits for its worker to exit, including after failure, timeout, or
cancellation. Sequential `await renderPdf()` calls therefore do not overlap
worker lifetimes. A timeout or abort starts termination; the promise settles
after the worker stops.

Use `timeoutMs`, `maxPages`, and an `AbortSignal` to bound a job. Limit concurrent
calls to fit your server's memory; each worker's WebAssembly memory ceiling is
512 MiB. Preview images can use more memory than PDF-only rendering.
Expand All @@ -120,12 +125,13 @@ TypeScript. Its release evidence compares retained native and WebAssembly
fixtures and installs the same tarball across Node 22, 24, and 26 on Windows,
Linux, and macOS. These are scoped engineering checks, not PDF standards certification.

The [npm publication record](https://github.com/fullbleed-engine/fullbleed-node/releases/download/v0.1.2/npm-publication-0.1.2.json)
The [npm publication record](https://github.com/fullbleed-engine/fullbleed-node/releases/download/v0.1.3/npm-publication-0.1.3.json)
confirms the registry tarball matches that release. A fresh registry install on
Windows / Node 24 reproduces its PDF/PNG hashes, including ESM/CommonJS and
recovery after a cold timeout.
Windows / Node 26 reproduces its PDF/PNG hashes, including ESM/CommonJS and
recovery after a cold timeout. Seven worker-lifecycle checks also pass against
the registry-installed package.

[Package source and API](https://github.com/fullbleed-engine/fullbleed-node) ·
[npm package](https://www.npmjs.com/package/fullbleed) ·
[Versioned release and evidence](https://github.com/fullbleed-engine/fullbleed-node/releases/tag/v0.1.2) ·
[Versioned release and evidence](https://github.com/fullbleed-engine/fullbleed-node/releases/tag/v0.1.3) ·
[CSS coverage](../css-coverage.md) · [Examples](../examples.md)
4 changes: 2 additions & 2 deletions examples/node/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A designed invoice from Node.js

This fictional Northstar Studio invoice uses Fullbleed's Node package 0.1.2,
This fictional Northstar Studio invoice uses Fullbleed's Node package 0.1.3,
which bundles the Fullbleed 2.5.6 engine and Inter, DM Serif Display, and Bebas
Neue fonts. You need Node.js 22 or newer; no Python or Rust installation is needed.

Expand All @@ -13,7 +13,7 @@ Open `output/invoice/invoice.pdf` and `output/invoice/page-1.png`. Change the
`customer` value in `render.mjs`; the script escapes it before insertion into HTML.
Edit `invoice.html` and `invoice.css` for your own layout and data.

The lockfile pins Fullbleed 0.1.2 from npm and its integrity hash.
The lockfile pins Fullbleed 0.1.3 from npm and its integrity hash.
The package renders locally; it does not upload documents to a service.

The sample and engine are MIT licensed. The package retains the bundled font
Expand Down
8 changes: 4 additions & 4 deletions examples/node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"node": ">=22"
},
"dependencies": {
"fullbleed": "0.1.2"
"fullbleed": "0.1.3"
}
}
12 changes: 6 additions & 6 deletions examples/node/source.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"package_version": "0.1.2",
"package_version": "0.1.3",
"engine_version": "2.5.6",
"source_commit": "efcc5afbf3bbd37894194472e35dea209a54ec0f",
"package_url": "https://github.com/fullbleed-engine/fullbleed-node/releases/download/v0.1.2/fullbleed-0.1.2.tgz",
"package_integrity": "sha512-mAwvG4R4YgXPW0b5dT/ne7HUTBUKQcmwaDkvtYPK/bMkBhoU/mTGXQFjh4AwLCv0aWV2vgNpmguhgGW48iDKHQ==",
"package_sha256": "df08fc22c578f2653bed4adc5cf9ac66603bfeb34aa6b8812ebe3cbeb842933f",
"source_commit": "2fb8e9f67024fb66a5496879e63b523b74d9fcc6",
"package_url": "https://github.com/fullbleed-engine/fullbleed-node/releases/download/v0.1.3/fullbleed-0.1.3.tgz",
"package_integrity": "sha512-0X05ow1By4yS/CaiCUGar6xlRc21flrILDSrTkIMe8hr7wzwBpaFmHAb1wXONWreoA3QRuA1dDhISVDHJecujg==",
"package_sha256": "2dec677856edd8c687a5442b43f5f4be7b04d5da0251fff36106dd0af59af47e",
"rendered": {
"invoice.pdf": "e09514ad458c62f9f9ef5df76168717b78b20ed365e892118f7aff6a4492e34b",
"invoice.png": "b76f6db748fb47b928c93c12fe788de94a0f5d8da4bb350f644a58705c163cf7"
Expand All @@ -15,7 +15,7 @@
},
"fictional_data": true,
"license": "MIT",
"verification_scope": "Reviewed invoice and quickstart, installed from the published GitHub package. No PDF standards certification.",
"verification_scope": "Reviewed invoice and quickstart, installed from the published npm package. No PDF standards certification.",
"report": {
"report.pdf": "a93e4df3f5af6cc010e0611f95c4c24588d0d27627d1571daddec4eb92b31105",
"report-2.png": "3e31e42b3c7cac8b01633e5675cb1446feec553afb392d4d6a7b73f8c8582ad9"
Expand Down
8 changes: 7 additions & 1 deletion tools/verify_node_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def run(label, command, cwd=workspace):
return result.stdout

run("install", [npm, "ci", "--ignore-scripts", "--no-audit", "--no-fund"])
installed = json.loads((workspace / "node_modules/fullbleed/package.json").read_text(encoding="utf8"))
assert installed["version"] == manifest["package_version"], "Installed package version differs from the guide."
assert installed["fullbleed"]["engineVersion"] == manifest["engine_version"]
lock = json.loads((workspace / "package-lock.json").read_text(encoding="utf8"))
assert lock["packages"]["node_modules/fullbleed"]["integrity"] == manifest["package_integrity"]
result = json.loads(run("render", ["render.mjs"]))
assert result["pages"] == 1 and result["missingGlyphs"] == 0 and result["engine"] == manifest["engine_version"]
outputs = {}
Expand Down Expand Up @@ -77,7 +82,8 @@ def run(label, command, cwd=workspace):
data = (snippet / name).read_bytes()
assert digest(data) == manifest["quickstart"][name], name
report = {"ok": True, "node": subprocess.check_output([str(node), "--version"], text=True).strip(),
"platform": os.name, "package_version": manifest["package_version"], "engine_version": manifest["engine_version"],
"platform": os.name, "package_version": installed["version"], "engine_version": installed["fullbleed"]["engineVersion"],
"installed_package_matches_manifest": True,
"source_commit": manifest["source_commit"], "commands": commands, "download_files": len(manifest["files"]),
"project_zip_sha256": manifest["zip_sha256"], "outputs": outputs, "quickstart": manifest["quickstart"],
"homepage_snippet_matches_executed_guide": True,
Expand Down
Loading