pkg_imposition version: 1.5.1

Published 2026-06-01

peter ruud

sdk | dart
repository | svn
platform | generic
status | n/a
  • Readme
  • Changelog
  • Versions

pkg_imposition

Complete port of the java libIMPOSITION library.

graph

Orienting the original bleed values array:

[
index 0: TOP    (T),
index 1: RIGHT  (R),
index 2: BOTTOM (B) and
index 3: LEFT   (L).
]

Results in:

Orientate Original Oriented Bleed values
NORTH: [T, R, B, L] [T, R, B, L] (no change)
EAST: [T, R, B, L] [R, B, L, T] (first element to tail)
SOUTH: [T, R, B, L] [B, L, T, R] (first 2 elements to tail)
WEST: [T, R, B, L] [L, T, R, B] (first 3 elements to tail)

Coordinate system

Because of the incompatibility of the coordinate systems used internally and that of external softwares, this library uses a coordinate system that has its origin at the bottom left corner.

A bottom-left origin is te most natural choise for describing imposition layouts, because it conforms to the current print industry standard.

The SVG coordinate system defaults to a top left origin, And the default, and preferable, origin of PDF files is bottom left 1.

This means that (Imposition) output generators should take care of proper conversion to the target coordinate system.


1 Although it is possible to create PDF files with a topdown coordinate system , this can lead to various problems. Querying block coordinates with PDFlib for instance will allways return values relative to the original bottom-left coordinate system.

"Note that the topdown option is not taken into account when querying Block coordinates." (PDFlib documentation)

Changelog

1.5.1 - 2026-06-01

Added

  • pkg_colors dependency.

1.5.0 - 2026-05-28

Changed (breaking)

  • SvgGenerator rendering flags (showPageBoxes, showDimensions, showDebugInfo, withInlineStyles) are now immutable constructor parameters. Replace SvgGenerator()..showPageBoxes = true with SvgGenerator(showPageBoxes: true).

Fixed

  • DartGenerator: guard against empty horizontalInterspace / verticalInterspace arrays to prevent index-out-of-range.
  • PdfGenerator: guard labelAnchors.isNotEmpty before accessing labelAnchors[0] in slug-line label positioning.
  • ImpositionGeneratorBuilder.fromImpositionParameters: was incorrectly assigning getVerticalLines() to horizontalLines; now correctly calls getHorizontalLines().
  • FitBoxMatrix._populateHorizontalFlow / _populateVerticalFlow: both were checking getColumnCount() <= 0 twice; now correctly check getRowCount() <= 0 || getColumnCount() <= 0.
  • FitBoxMatrix._populateSlugLines: null-safe handling of _calculateSlugRect result — skips with continue instead of force-unwrapping !.
  • ImpositionParameters.setSlugLinesLocations: clears and repopulates the _slugLineLocations cache on every call.
  • ArrayMixin.completeArray: returns a defensive copy when source length ≥ target length.
  • FitBoxMatrix column/row position helpers (isFirstColumnOnPrintedPage etc.): replaced full-list-scan with direct index comparison (correctness & performance).

Added

  • New test files: FitOrderComparator, SvgGenerator (extended), ArrayMixin (extended), FitBox (extended), FitBoxMatrix (extended), FitPdfOptions (extended), ImpositionGeneratorBuilder, ImpositionParameters (extended), Imposition, and Line2D.
  • SvgGenerator: separate CSS rules for .fitbox-page-number and .fitbox-orientate-pointer; added stroke: none and text-anchor: middle to the stylesheet block.
  • Test output SVG/PDF files now written to organised inline/ and no-inline/ subdirectories under a dedicated _kTmpDir.

1.4.22 - 2026-05-01

Changed

  • Version bump from 1.4.21 to 1.4.22 (build_runner -> 2.15.0 (was 2.14.1)).

1.4.21 - 2026-04-28

Changed

  • Version bump from 1.4.20 to 1.4.21 (test -> 1.31.1 (was 1.31.0)).

1.4.20 - 2026-04-28

Changed

  • Version bump from 1.4.19 to 1.4.20 (build_runner -> 2.14.1 (was 2.14.0)).

1.4.19 - 2026-04-22

Changed

  • Version bump from 1.4.18 to 1.4.19 (build_runner -> 2.14.0 (was 2.13.1)).

1.4.18 - 2026-03-23

Changed

  • Version bump from 1.4.17 to 1.4.18 (test -> 1.31.0 (was 1.30.0)).

1.4.17 - 2026-03-23

Changed

  • Version bump from 1.4.16 to 1.4.17 (build_runner -> 2.13.1 (was 2.13.0)).

1.4.16 - 2026-03-18

Changed

  • Version bump from 1.4.15 to 1.4.16 (build_runner -> 2.13.0 (was 2.12.2)).

1.4.15 - 2026-03-06

Changed

  • Version bump from 1.4.14 to 1.4.15 (build_runner -> 2.12.2 (was 2.12.1)).

1.4.14 - 2026-03-05

Changed

  • Version bump from 1.4.13 to 1.4.14 (build_runner -> 2.12.1 (was 2.11.1)).

1.4.13 - 2026-02-27

Changed

  • Version bump from 1.4.12 to 1.4.13 (test -> 1.30.0 (was 1.29.0)).

1.4.12 - 2026-02-12

Changed

  • Version bump from 1.4.11 to 1.4.12 (build_runner -> 2.11.1 (was 2.11.0)).

1.4.11 - 2026-02-06

Changed

  • Version bump from 1.4.10 to 1.4.11 (build_runner -> 2.11.0 (was 2.10.5)).

1.4.10 - 2026-02-02

Changed

  • Version bump from 1.4.9 to 1.4.10 (lints -> 6.1.0 (was 6.0.0)).

1.4.9 - 2026-01-14

Changed

  • Version bump from 1.4.8 to 1.4.9 (build_runner -> 2.10.5 (was 2.10.4)).

1.4.8 - 2026-01-08

Changed

  • Version bump from 1.4.7 to 1.4.8 (test -> 1.29.0 (was 1.28.0)).

1.4.7 - 2026-01-05

Changed

  • Version bump from 1.4.6 to 1.4.7 (equatable -> 2.0.8 (was 2.0.7)).

1.4.6 - 2025-11-21

Changed

  • Version bump from 1.4.5 to 1.4.6 (test -> 1.28.0 (was 1.27.0)).

1.4.5 - 2025-11-19

Changed

  • Version bump from 1.4.4 to 1.4.5 (build_runner -> 2.10.4 (was 2.10.3)).

1.4.4 - 2025-11-14

Changed

  • Version bump from 1.4.3 to 1.4.4 (build_runner -> 2.10.3 (was 2.10.1)).

1.4.3 - 2025-11-11

Changed

  • Version bump from 1.4.2 to 1.4.3 (test -> 1.27.0 (was 1.26.3)).

1.4.2 - 2025-10-27

Changed

  • Version bump from 1.4.1 to 1.4.2 (build_runner -> 2.10.1 (was 2.10.0)).

1.4.1 - 2025-10-21

Changed

  • Version bump from 1.4.0 to 1.4.1 (build_runner -> 2.10.0 (was 2.9.0)).

1.4.0 - 2025-10-07

Removed

  • Removed mustConvert from ParameterKey enum (was not used anywhere).

Added

  • Added offset x/y to ImpositionParameters to shift the content on the page.
  • Generation of crop marks in svg files.

Changed

  • Crease marks in pdf 50% black, cut marks in pdf 100% black.

1.3.42 - 2025-10-03

Changed

  • Version bump from 1.3.41 to 1.3.42 (build_runner -> 2.9.0 (was 2.8.0)).

1.3.41 - 2025-09-22

Changed

  • Version bump from 1.3.40 to 1.3.41 (build_runner -> 2.8.0 (was 2.7.1)).

1.3.40 - 2025-09-16

Changed

  • Version bump from 1.3.39 to 1.3.40 (xml -> 6.6.1 (was 6.5.0)).

1.3.39 - 2025-09-04

Changed

  • Version bump from 1.3.38 to 1.3.39 (build_runner -> 2.7.1 (was 2.7.2)).

1.3.38 - 2025-09-04

Changed

  • Version bump from 1.3.37 to 1.3.38 (build_runner -> 2.7.2 (was 2.7.1)).

1.3.37 - 2025-09-03

Changed

  • Version bump from 1.3.36 to 1.3.37 (build_runner -> 2.7.1 (was 2.7.0)).

1.3.36 - 2025-09-01

Changed

  • Version bump from 1.3.35 to 1.3.36 (build_runner -> 2.7.0 (was 2.6.0)).

1.3.35 - 2025-08-08

Changed

  • Version bump from 1.3.34 to 1.3.35 (build_runner -> 2.6.0 (was 2.6.1)).

1.3.34 - 2025-08-08

Changed

  • Version bump from 1.3.33 to 1.3.34 (build_runner -> 2.6.1 (was 2.6.0)).

1.3.33 - 2025-07-28

Changed

  • Version bump from 1.3.32 to 1.3.33 (build_runner -> 2.6.0 (was 2.5.4)).

1.3.32 - 2025-07-23

Changed

  • Version bump from 1.3.31 to 1.3.32 (test -> 1.26.3 (was 1.26.2)).

1.3.31 - 2025-07-16

Changed

  • Orientate.next() to rotate the orientation to the next value (north becomes east).

1.3.30 - 2025-06-24

Changed

  • Version bump from 1.3.29 to 1.3.30 (build_runner -> 2.5.4 (was 2.5.3)).

1.3.29 - 2025-06-23

Changed

  • Version bump from 1.3.28 to 1.3.29 (build_runner -> 2.5.3 (was 2.5.2)).

1.3.28 - 2025-06-18

Changed

  • Version bump from 1.3.27 to 1.3.28 (build_runner -> 2.5.2 (was 2.4.12)).

1.3.27 - 2025-06-18

Changed

  • Version bump from 1.3.26 to 1.3.27 (build_runner -> 2.4.12 (was 2.5.1)).

1.3.26 - 2025-06-17

Changed

  • Version bump from 1.3.25 to 1.3.26 (build_runner -> 2.5.1 (was 2.5.0)).

1.3.25 - 2025-06-17

Changed

  • Version bump from 1.3.24 to 1.3.25 (build_runner -> 2.5.0 (was 2.4.15)).

1.3.24 - 2025-05-22

Changed

  • Version bump from 1.3.23 to 1.3.24 (lints -> 6.0.0 (was 5.1.1)).

1.3.23 - 2025-05-22

Changed

  • Version bump from 1.3.22 to 1.3.23 (test -> 1.26.2 (was 1.26.1)).

1.3.22 - 2025-05-20

Changed

  • Version bump from 1.3.21 to 1.3.22 (test -> 1.26.1 (was 1.26.0)).

1.3.21 - 2025-05-13

Changed

  • Version bump from 1.3.20 to 1.3.21 (test -> 1.26.0 (was 1.25.15)).

1.3.20 - 2025-04-02

Changed

  • Version bump from 1.3.19 to 1.3.20 (collection -> 1.19.1 (was 1.19.0)).

1.3.19 - 2025-04-02

Changed

  • Version bump from 1.3.18 to 1.3.19 (test -> 1.25.15 (was 1.25.14)).

1.3.18 - 2025-02-28

Changed

  • Version bump from 1.3.17 to 1.3.18 (build_runner -> 2.4.15 (was 2.4.14)).

1.3.17 - 2024-12-23

Changed

  • Version bump from 1.3.16 to 1.3.17 (collection -> 1.19.0 (was 1.19.1)).

1.3.16 - 2024-12-23

Changed

  • Version bump from 1.3.15 to 1.3.16 (collection -> 1.19.1 (was 1.19.0)).

1.3.15 - 2024-12-23

Changed

  • Version bump from 1.3.14 to 1.3.15 (test -> 1.25.14 (was 1.25.13)).

1.3.14 - 2024-12-23

Changed

  • Version bump from 1.3.13 to 1.3.14 (lints -> 5.1.1 (was 5.1.0)).

1.3.13 - 2024-12-19

Changed

  • Version bump from 1.3.12 to 1.3.13 (Support Apple silicon (arm64)).

1.3.12 - 2024-12-19

Changed

  • Version bump from 1.3.11 to 1.3.12 (collection -> 1.19.0 (was 1.19.1)).

1.3.11 - 2024-12-19

Changed

  • Version bump from 1.3.10 to 1.3.11 (collection -> 1.19.1 (was 1.19.0)).

1.3.10 - 2024-12-19

Changed

  • Version bump from 1.3.9 to 1.3.10 (build_runner -> 2.4.14 (was 2.4.13)).

1.3.9 - 2024-12-18

Changed

  • Version bump from 1.3.8 to 1.3.9 (test -> 1.25.13 (was 1.25.12)).

1.3.8 - 2024-12-12

Changed

  • Version bump from 1.3.7 to 1.3.8 (lints -> 5.1.0 (was 5.0.0)).

1.3.7 - 2024-12-12

Changed

  • Version bump from 1.3.6 to 1.3.7 (collection -> 1.19.0 (was 1.18.0)).

1.3.6 - 2024-12-05

Changed

  • Version bump from 1.3.5 to 1.3.6 (test -> 1.25.12 (was 1.25.11)).

1.3.5 - 2024-12-04

Changed

  • Version bump from 1.3.4 to 1.3.5 (test -> 1.25.11 (was 1.25.10)).

1.3.4 - 2024-12-03

Changed

  • Version bump from 1.3.3 to 1.3.4 (test -> 1.25.10 (was 1.25.9)).

1.3.3 - 2024-11-27

Changed

  • Version bump from 1.3.2 to 1.3.3 (test -> 1.25.9 (was 1.25.8)).

1.3.2 - 2024-11-22

Changed

  • Version bump from 1.3.1 to 1.3.2 (equatable -> 2.0.7 (was 2.0.6)).

1.3.1 - 2024-08-22

Changed

  • Version bump from 1.3.0 to 1.3.1 (SDK update 3.5.1).

1.3.0 - 2024-08-16

Fixed

  • Keep enums in a separate package (pkg_imposition_enums).

1.2.5 - 2024-08-09

Changed

  • Removed get_it dependency.

1.2.4 - 2024-04-03

Changed

  • Parse Imposition string from pdf metadata with pkg_pdfio before trying pkg_pdflib.

1.2.3 - 2024-02-07

Removed

  • copy_with_extension_gen dependency.

1.2.2 - 2024-02-01

Changed

  • Version bump from 1.2.1 to 1.2.2 (Resolve package version confusions).

1.2.1 - 2024-02-01

Changed

  • Version bump from 1.2.0 to 1.2.1.

1.2.0 - 2023-12-04

Changed

  • Allow floats in page dimensions (mostly in toString methods).

1.1.1 - 2023-10-16

Added

  • collection dependency.

Removed

  • quiver dependency.

1.1.0 - 2023-07-06

Added

  • pkg_imposition_enums.dart when using the enums only (without dependencies on pdflib).

1.0.22 - 2023-07-06

Fixed

  • Hyphens and underscores in enums.

1.0.21 - 2023-06-05

Changed

  • From flutter_test to pure-dart test.

1.0.20 - 2023-03-29

Changed

  • test with flutter because of dev dependencies.

1.0.19 - 2023-02-09

Changed

  • Version bump from 1.0.18 to 1.0.19 (Version confusion after compiler bug chaos).

1.0.18 - 2023-01-31

Changed

  • Version bump from 1.0.17 to 1.0.18.

1.0.17 - 2023-01-31

Changed

  • Version bump from 1.0.16 to 1.0.17.

1.0.16 - 2022-12-27

Changed

  • Version bump from 1.0.15 to 1.0.16.

1.0.15 - 2022-12-22

Changed

  • Version bump from 1.0.14 to 1.0.15.

1.0.14 - 2022-12-22

Changed

  • Version bump from 1.0.13 to 1.0.14 (Recompile due to installer optimizations).

1.0.13 - 2022-11-29

Added

  • Use kPdflibCompatibilityVersion constant.

1.0.12 - 2022-10-31

Added

  • OutputDevice.grootformaat.

1.0.11 - 2022-10-21

Added

  • ImpositionParameters.fromFile to read param from a pdf template.

1.0.10 - 2022-10-19

Changed

  • Removed all print statements for logging.

1.0.9 - 2022-10-11

Changed

  • Version bump from 1.0.8 to 1.0.9 (Recompile due to wrong GetIt.instance syntax.).

1.0.8 - 2022-10-05

Changed

  • Version bump from 1.0.7 to 1.0.8 (fixed pdflib searchpath macos crash).

1.0.7 - 2022-10-01

Changed

  • Version bump from 1.0.6 to 1.0.7 (pkg_pdflib bundle macos dylib).

1.0.6 - 2022-09-30

Changed

  • Made pure dart.

1.0.5 - 2022-09-29

Changed

  • Version bump from 1.0.4 to 1.0.5 (dependencies upgraded).

1.0.4 - 2022-08-31

Changed

  • removed various finals due to new linter rules.

1.0.3 - 2022-08-30

Added

  • vo cascade operator test to imposition_parameters_test.

1.0.2 - 2022-08-29

Added

  • Setters to ImpositionParameters.

1.0.1 - 2022-08-29

Changed

  • README.md.

1.0.0 - 2022-08-29

Changed

  • Port from java to dart by @ruud.

0.1.0 - 2022-07-25

Changed

  • First minor version.

0.0.1+2 - 2022-06-09

Changed

  • Unknown changes.

0.0.1 - 2022-03-17

Changed

  • Initial version.

1.5.1

2026-06-01 download

1.5.0

2026-05-28 download

1.4.22

2026-05-01 download

1.4.18

2026-03-23 download

1.4.13

2026-02-27 download

1.4.12

2026-02-12 download

1.4.11

2026-02-06 download

1.4.10

2026-02-02 download

1.4.9

2026-01-14 download

1.4.6

2025-11-21 download

1.4.4

2025-11-14 download

1.4.3

2025-11-11 download

1.4.2

2025-10-27 download

1.4.0

2025-10-07 download

1.3.41

2025-09-22 download

1.3.39

2025-09-04 download

1.3.37

2025-09-03 download

1.3.35

2025-08-08 download

1.3.33

2025-07-28 download

1.3.32

2025-07-23 download

1.3.31

2025-07-16 download

1.3.30

2025-06-24 download

1.3.29

2025-06-23 download

1.3.25

2025-06-17 download

1.3.24

2025-05-22 download

1.3.22

2025-05-20 download

1.3.21

2025-05-13 download

1.3.20

2025-04-02 download

1.3.18

2025-02-28 download

1.3.17

2024-12-23 download

1.3.13

2024-12-19 download

1.3.9

2024-12-18 download

1.3.8

2024-12-12 download

1.3.3

2024-11-27 download

1.3.2

2024-11-22 download

1.3.1

2024-08-22 download

1.3.0

2024-08-16 download

1.2.4

2024-04-03 download

1.2.3

2024-02-07 download

1.2.2

2024-02-01 download

1.2.1

2024-02-01 download

1.2.0

2023-12-04 download

1.1.1

2023-10-16 download

1.1.0

2023-07-06 download

1.0.22

2023-07-06 download

1.0.21

2023-06-05 download

1.0.20

2023-03-29 download

1.0.19

2023-02-09 download

1.0.18

2023-01-31 download

1.0.16

2022-12-27 download

1.0.15

2022-12-22 download

1.0.14

2022-12-22 download

1.0.13

2022-11-29 download

1.0.12

2022-10-31 download

1.0.11

2022-10-21 download

1.0.10

2022-10-19 download

1.0.9

2022-10-11 download

1.0.8

2022-10-05 download

1.0.7

2022-10-01 download

1.0.6

2022-09-30 download

1.0.5

2022-09-29 download

1.0.4

2022-08-31 download

1.0.3

2022-08-30 download

1.0.2

2022-08-29 download

1.0.1

2022-08-29 download

1.0.0

2022-08-29 download

0.1.0

2022-07-25 download