printpdf 0.13.1

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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
        with:
          toolchain: stable
          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@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
      - name: Upload site
        uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
        with:
          # _site/ is assembled by scripts/build-demo.sh: the page from web/,
          # pkg/, default-fonts.js and the example assets the demo fetches.
          path: "_site"
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1