CODE-253: Set default PDF export canvas dimensions to standard US Let… - #7728
Conversation
There was a problem hiding this comment.
Is this file important? I feel, that you don’t review code after AI.
There was a problem hiding this comment.
A PowerShell regex replacement misfired in my terminal and generated phantom files instead of modifying Globals.java. I've nuked the garbage files and force-updated the branch so it only contains the clean XSLT/Java fixes.
…ter for American locales
18f34d3 to
6a04bda
Compare
|
Issue Breakdown The PCGen export engine was hardcoded to default to European A4 dimensions, completely ignoring the user's operating system locale settings. An initial attempt to apply the US default using the frontend translation string "in_PaperLetter" caused the FreeMarkerExportHandler to crash with an Invalid export tag 'PAPERINFO.NAME' error, as the XML exporter requires the strict internal identifier. Applied Fixes Rewrote initPreferences() in Globals.java to evaluate Locale.getDefault().getCountry() dynamically, successfully assigning standard US Letter defaults for system environments set to US or CA. Replaced the "in_PaperLetter" string with the correct "Letter" identifier across Globals.java and system\gameModes\default\paperInfo.lst to safely resolve the FreeMarker template crash. Validated the fix locally; engine now auto-corrects corrupted preferences and correctly exports PDFs with 8.50 × 11.00 inch dimensions for American locales. |


…ter for American locales
https://pcgenorg.atlassian.net/browse/CODE-2537