Thanks for wanting to help. Two things to know before your first PR:
- CLA. BentoPDF uses a dual licensing model (AGPL-3.0 plus a commercial license), so we need a signed Contributor License Agreement before we can merge anything. The CLA bot will prompt you on your first pull request; signing is a single comment and only happens once. Corporate contributors: see CCLA.md.
- Bug fixes come with their PDF. The regression suite is a directory of
documents that each broke the engine once. If you fix a bug, add the
reproducing file to
tests/regression/failset/so it stays fixed. A file we may not redistribute goes intests/regression/remote.csvinstead, with its public URL and SHA-256;make regressdownloads it.
npm ci
make check # typecheck, lint, unit tests; works on a bare checkoutThat's enough for changes to the SDK, CLI, tests, or web code. For engine
(C++) work you need built worker binaries: either grab them from the latest
release into cli/prebuilt/, or build from source per BUILDING.md.
With binaries present, make check also runs the integration tests, and:
make regress # the failset, every preset, validity + fidelity + text layeris the gate a bug fix has to pass; it ends with a failing-pairs count that must be zero.
core/srcis the engine, one big translation unit plus small wrappers.core/patchesare full-file patches against the pinned PDFium revision.core/build/apply-tree.showns the pin; never edit the checkout directly.sdk/node,sdk/native,cli,wasm,web, andserverare all front ends over the same engine. Behavior belongs in the engine; front ends stay thin.
- The C ABI (
sdk/native/hpdf.h) is additive-only within a major version.HPDF_VERSIONthere is the single version source;make checkfails if package.json drifts from it. - The output must never grow and never break: anything that can degrade a document has to be guarded by verification or a rollback, like the existing regeneration and JBIG2 checks.
- Fuzzing runs through ClusterFuzzLite on every pull request that touches the
engine, and again nightly for a longer session.
make fuzzruns the same harness locally. If your change touches parsing paths, run the fuzzer for a while before opening the PR. - No comments policy: the code in this repository is deliberately comment-free; write code that doesn't need them.