Break pages up when long enough on tally report #5290
Merged
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.
Overview
Fixes #5263
On the all bubble ballot the pdf we generate is so long that canvas seg faults when converting to an image. To avoid this problem we can just break up the page when it streches beyond 100 inches, which will never happen in anything but extreme situations. If the content height is longer then a standard paper length but shorter then 100 inches we will still truncate the length of the report to the length of the content (and we will never make it smaller then a standard page).
Note this change should really only affect the all bubble ballot.
Demo Video or Screenshot
PDF of printed all bubble polls open report
print-job-2024-08-21T00:36:50.587Z.pdf
Note the contest starts on the second page because of an unrelated annoyance with how tally reports render for this election.
Testing Plan
Used mock printer and inspected pdfs, ran tests and saw them still pass, added new test.
Checklist