Skip to content

pdf_manipulator 3.0.0

Choose a tag to compare

@github-actions github-actions released this 19 Jul 12:57
· 0 commits to 705ce1950ea211375336639ba449f407898dbbb8 since this release
  • Breaking: flattening CJK or emoji form values no longer uses a bundled font (it added 4.4 MB to every install). Register one once: await pdf.registerFallbackFont(PdfFallbackFontKind.cjk, fontBytes) (.emoji for emoji). Without one the value is still saved correctly — only the baked-in look falls back to the field's own font.
  • Breaking (only if you took the retracted 2.2.0): the trim-detector value analyzer is now scan → change it or delete the line — it is the default (PR #172)
  • Engine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
  • Added trim — keep only the features your app uses (#167). Put trim: auto under hooks: user_defines: pdf_manipulator: in your app pubspec, or choose yourself with trim: {keep: [render, signatures]}; on web also run flutter pub run pdf_manipulator:setup --trim. Needs Rust — the engine compiles once on your machine and is cached. Wrong or missing pieces fail with a clear message, never a broken app.
  • Added Pdf.registerFallbackFont(PdfFallbackFontKind, Uint8List).
  • Changed the default binary: dead engine surfaces, unused barcode support, and the embedded fonts are gone — native 28.7 MB → 21.1 MB, gzipped web download 11.3 MB → 7.3 MB. No action needed.
  • Changed the web build to compile its own wasm-bindgen + wasm-opt inside the engine's cargo workspace, version-locked by the engine's Cargo.lockwasm-bindgen-cli, binaryen, and jq are no longer needed, Rust is the only requirement on every platform, and the exact-version rejection is gone with the tools (#177 reported by @DarkWingMcQuack, PR #178)
  • Fixed the package forcing an old analyzer version onto your app, which blocked current freezed / json_serializable and friends. The analyzer dependency is gone: trim: auto uses a dependency-free source scan. It can only keep slightly more than you use, never less — state trim: {keep: [...]} yourself for the exact minimum (#171 reported by @DarkWingMcQuack, PR #172)
  • Fixed the package archive missing a build file (the engine's Cargo.lock), which broke trim and every compile-from-source path with "No such file or directory" (#171 reported by @DarkWingMcQuack, PR #172)
  • Fixed the web compile error message telling you to install wasm-pack — it is not used. The build now points at the tool it actually misses, with the exact install command (PR #172)
  • Fixed trim: auto counting member names inside comments as usage — a doc line saying "render them" kept the render capability. The scan now ignores comments, and prints where each kept member was matched, e.g. render (lib/preview.dart:12) (#175 reported by @DarkWingMcQuack, PR #178)
  • Fixed source builds failing with "rustup: command not found" on Rust installs not managed by rustup (Homebrew, distro packages) — the build now asks rustc itself whether a target is installed and uses rustup only as the fallback (#176 reported by @DarkWingMcQuack, PR #178)
Commits since v2.2.0 (8)
  • 705ce19 release: v3.0.0
  • eeb322d chore: promote dev to prod (3.0.0) (#179)
  • 9fadb24 Merge branch 'prod' into dev
  • afd3b45 fix: Rust-only trim toolchain — comment-aware scan, rustc target probe, workspace-locked wasm tools (#178)
  • 7322e8d chore: refresh lockfiles (#174)
  • e423aad ci: run analyze-floor in make check and guard battery-runner completeness
  • 4066afa docs(roadmap): record_use ^0.6.0 pin reason + bump trigger (#173)
  • 23fe620 fix: ship vendor Cargo.lock in the pub tarball + tarball gate (#171) (#172)

Install (git tag)

dependencies:
  pdf_manipulator:
    git:
      url: https://github.com/whuppi/pdf_manipulator.git
      ref: v3.0.0

Install (pub.dev)

dependencies:
  pdf_manipulator: ^3.0.0