BL-15958 Expand full-bleed page-size support and dotImpose handoff - #8263
Draft
hatton wants to merge 3 commits into
Draft
BL-15958 Expand full-bleed page-size support and dotImpose handoff#8263hatton wants to merge 3 commits into
hatton wants to merge 3 commits into
Conversation
Adds DistFiles/pageSizesLookup.json (generated by src/content/pageSizes.ts) so C# code can look up page dimensions for any layout. Uses it in SizeAndOrientation, EpubMaker, and the PDF pipeline. Keeps full-bleed trim/bleed boxes intact through the dotImpose handoff, and keeps booklet source pages trim-sized. Known issue: NullLayoutMethod_FullBleedWithCropMarks_KeepsTrimAtFinalPageSize fails against the public sillsdev.dotImpose 2.6.2; the expected behavior exists only in unpublished dotImpose builds (2.6.9-2.6.13). Carved from the updated BL-15958-edge-to-edge-theme work (PR #7713). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 31, 2026
Closed
Contributor
|
| Filename | Overview |
|---|---|
| src/BloomExe/Book/SizeAndOrientation.cs | Adds lazy loading and orientation-aware access to generated millimeter dimensions; the two new public methods need documentation comments. |
| src/content/pageSizes.ts | Extends the existing page-size build step to deterministically generate a C#-consumable lookup with configured, ISO-series, and square aliases. |
| src/BloomExe/Publish/PDF/MakePdfUsingExternalPdfMakerProgram.cs | Replaces the fixed full-bleed size switch with lookup-backed trim dimensions plus a 3 mm bleed on every edge. |
| src/BloomExe/Publish/PDF/PdfMaker.cs | Recreates page boxes before dotImpose and supplies a consistent 3 mm full-bleed inset; compatibility with the currently published dotImpose behavior remains explicitly acknowledged by the PR. |
| src/BloomExe/Publish/PDF/PublishPdfApi.cs | Automatically synchronizes crop-mark generation with the selected book's print-bleed preference. |
| src/BloomExe/Publish/PublishModel.cs | Restricts bleed-sized source pages to non-booklet output so imposed booklet layouts continue using trim dimensions. |
| src/BloomExe/Publish/Epub/EpubMaker.cs | Reuses the generated millimeter lookup and converts dimensions to CSS pixels for ePub output. |
| src/BloomTests/Publish/PDF/PdfMakerTests.cs | Adds bleed-offset and dotImpose TrimBox coverage, including the dependency behavior explicitly called out as unresolved. |
| src/BloomTests/Publish/PDF/MakePdfUsingExternalPdfMakerProgramTests.cs | Covers expanded portrait, landscape, square, and unsupported full-bleed page-size handling. |
Reviews (1): Last reviewed commit: "BL-15958 Expand full-bleed page-size sup..." | Re-trigger Greptile
The newly published dotImpose deprecates NullLayoutMethod(insetTrimboxMillimeters) and throws when the source PDF already defines a TrimBox. Bloom sets explicit trim/bleed boxes on full-bleed pages (SetFullBleedPageBoxes), so use the parameterless NullLayoutMethod and remove GetNullLayoutBleedOffsetMm. The crop-marks test now builds its input with the same explicit boxes and passes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Claude Fable 5 following a prompt from Hatton]
Part 2 of 3 of the updated BL-15958 work, split out of #7713.
Tracker: BL-15958
What this does
DistFiles/pageSizesLookup.json, generated at build time bysrc/content/pageSizes.ts, so C# code can look up trim dimensions for any layout.SizeAndOrientation.TryGetSizeInMillimetersreads it.EpubMaker.GetPageDimensionsnow uses that lookup instead of parsingpageSizes.jsonitself.MakePdfUsingExternalPdfMakerProgramsizes full-bleed pages from the lookup, andPdfMakerwrites explicit trim/bleed boxes before the dotImpose handoff.PublishModel.GetPrintingWithFullBleed).sillsdev.dotImposeto 2.6.7-test, published to nuget.org from sillsdev/dotImpose master. The new library deprecatesNullLayoutMethod(insetTrimboxMillimeters); Bloom now uses the parameterlessNullLayoutMethod()because the source PDF carries explicit boxes.Follow-up before merge
The pin is a prerelease version (
2.6.7-test). The dotImpose publish workflow fills its default suffix "test" even when the dispatch input is empty, so a release version needs a one-line workflow fix in that repo first. Then bump the pin here.Relationship to the other parts
Independent of the other two PRs; based on master. The siblings are the edge-to-edge theme PR (#8262) and the edit-mode crop-marks PR (#8264).
Verification
PdfMakerTestsandMakePdfUsingExternalPdfMakerProgramTestsfixtures pass: 25 of 25, including the full-bleed crop-marks trim test that failed against dotImpose 2.6.2.🤖 Generated with Claude Code
This change is
Devin review