pdf_test_fixtures 1.2.3 copy "pdf_test_fixtures: ^1.2.3" to clipboard
pdf_test_fixtures: ^1.2.3 copied to clipboard

Programmatically-built PDF files for testing PDF tooling. Builders compute every offset, so fixtures are always structurally correct.

pdf_test_fixtures #

pub package pub points CI License: Apache-2.0

Programmatic builders for structurally-correct PDF test files, shared by the dart-pdf suite's test suites and useful for testing any PDF tooling.

Because fixtures are built in code, byte offsets, xref entries, and stream lengths are always correct, with no hand-edited files to drift.

Builders #

  • Classic xref-table and xref-stream documents.
  • Multi-page and varied-height documents (defeats uniform-extent assumptions in viewers).
  • Annotated documents (links, GoTo actions, markup annotations).
  • AcroForm documents (text, checkbox, radio, choice fields).
  • Encrypted documents.
  • A test signer identity (key + certificate) for signature tests.
import 'package:pdf_test_fixtures/pdf_test_fixtures.dart';

final bytes = buildMultiPagePdf(5);
0
likes
160
points
487
downloads

Documentation

API reference

Publisher

verified publisherbenmilanko.com

Weekly Downloads

Programmatically-built PDF files for testing PDF tooling. Builders compute every offset, so fixtures are always structurally correct.

Repository (GitHub)
View/report issues
Contributing

Topics

#pdf #testing #fixtures

License

Apache-2.0 (license)

Dependencies

crypto, pdf_cos

More

Packages that depend on pdf_test_fixtures