printpdf 0.12.0

Rust library for reading and writing PDF files
Documentation
# Deploys the wasm demo to GitHub Pages (https://fschutt.github.io/printpdf/).
#
# Runs on release tags and manually. The build is scripts/build-demo.sh — the
# SAME script the demo-e2e workflow tests on every push, so what deploys is
# what was tested. (The previous version of this workflow was manual-only and
# regex-injected base64 fonts into script.js; the demo on Pages went 5 months
# stale without anyone noticing, which is how the "save error" of early 2026
# survived long after the underlying bug was fixed.)
name: Deploy demo to Pages

on:
  push:
    tags: ["v*"]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

# Allow only one concurrent deployment; never cancel an in-progress production
# deploy.
concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: wasm32-unknown-unknown
      - name: Install wasm-pack (prebuilt)
        run: |
          set -euo pipefail
          curl -sL https://github.com/rustwasm/wasm-pack/releases/download/v0.13.1/wasm-pack-v0.13.1-x86_64-unknown-linux-musl.tar.gz \
            | tar xz --strip-components=1 -C /usr/local/bin --wildcards '*/wasm-pack'
      - name: Build the demo (wasm + default fonts)
        run: bash scripts/build-demo.sh
      - name: Setup Pages
        uses: actions/configure-pages@v5
      - name: Upload site
        uses: actions/upload-pages-artifact@v3
        with:
          # Repo root: index.html, style.css, script.js, default-fonts.js, pkg/,
          # and examples/assets (the recipe example fetches cat.jpg from there).
          path: "."
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4