PDF Page Size not working in V7.12.2

Did a fresh install of v7.12.2 and PDF Templates ‘Page Size’ has no effect.
Pages always come out A4.
Letter (should be 8.5"x11") comes out A4 (8.27"x11.69").
Same for ‘legal’.
Worked fine in V7.11.22

Probably related to this

the PDF engine had to be changed for licensing reasons…

One solution:
In studio/dropdown editor/pdf_page_size_dom delete ‘Letter’ and replace with ‘LETTER’ (item name).

To fix the ’Page Size’ issue in the SuiteCRM 7.12.2 Version, you need to make changes in the Default file which is responsible for the PDF Generation. Currently ‘Page Size’ is not passed as a Capital Letter that’s the reason for no effect while exporting the PDF.

You need to pass the ‘Page Size’ value in strtoupper.

Modify the Code in below file,

/modules/AOS_PDF_Templates/generatePdf.php (Approx. Line number 147)