fix(printandplay): reduce PDF size — JPEG Q=85 + skip CMYK - #277
Merged
Conversation
Tarot Print&Play A4 PDFs were 223 MB, exceeding Edge PDFium's ~256 MB memory limit. Two changes bring this down to ~15-30 MB: - Convert card images to JPEG Q=85 before embedding in Print&Play PDFs (new ConvertToJpeg helper in PdfManager.cs using Magick.NET) - Set ConvertToCmyk = false on Print&Play CardSets only (Rules, Fallacies, Memo, Scenarii) — CMYK is for professional print, not home printing Other card types (Tarot, Poker, A0, Thumbnails) retain CMYK=true. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
ai-01 review — LGTM, prêt à mergerNote : Diff review (clean) :
Defensive design : Cohérence avec design A+B décidé cycle 3 : ✅ exact Follow-up non-bloquant (PR ultérieure si on rencontre le cas) :
Validation post-merge requise (rapide, ~5-10min vs 25min full) :
@jsboige — feu vert pour merge. |
This was referenced May 16, 2026
jsboige
added a commit
that referenced
this pull request
May 16, 2026
…282) PR #277 hardcoded RGB JPEG for Print&Play, degrading printer output. This refactor uses the existing UseDebugParams/UseReleaseParams pattern: - DocumentCardSet: add ConvertToCmykDebug/Release + GetConvertToCmyk(config) Debug=false (Edge preview), Release=true (printer quality) - ImageHelper: use GetConvertToCmyk(config) instead of ConvertToCmyk - PdfManager: JPEG Q=85 only in Debug mode, PNG lossless in Release - Remove hardcoded ConvertToCmyk=false from 4 Print&Play CardSets | Build | Print&Play output | Tarot FR size | |-------------|-------------------------|---------------| | dotnet run | RGB JPEG Q=85 | ~71 MB | | -c Release | CMYK PNG lossless | ~222 MB | Co-authored-by: Claude Opus 4.6 <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.
Summary
ConvertToJpeghelper inPdfManager.cs)ConvertToCmyk = falseon Print&Play CardSets only (Rules, Fallacies, Memo, Scenarii) — CMYK is for professional print, not home printingConvertToCmyk = trueProblem
Tarot Print&Play A4 PDFs were 223 MB, exceeding Edge PDFium's ~256 MB memory limit. This made them unusable in browser-based PDF viewers.
Expected Result
PDFs reduced from ~223 MB to ~15-30 MB (JPEG compression + no CMYK colorspace expansion).
Test plan
dotnet build— 0 errors, 19 warnings (pre-existing)dotnet test— 120 pass / 0 fail / 5 skip (stable)Closes #251
🤖 Generated with Claude Code