NSPrintInfo paperSize cannot be customized under Big Sur anymore

Hi there,

I have a question about printing under Big Sur. We are offering support for a bunch of custom paper formats, updating the NSPrintInfo by creating a custom PMPaper, creating a PMPageFormat, setting it to the printInfo and then calling updateFromPMPageFormat. This worked perfectly fine over the years, but has stopped working under Big Sur.

The print preview in the NSPrintPanel is still displaying the resulting file correctly and saving it as PDF also gives us a file with correctly sized pages. But since Big Sur, printers we've tried fail to print on custom sized paper from our app. The error seems to indicate that the printer thinks the file is in A4.

Interestingly, the printSettings of NSPrintInfo now holds has a value of "A4" for the key com_apple_print_PageToPaperMappingMediaName. There is no documentation around that key though and I can't seem to figure out where its coming from in the first place. Also can't see any API changes we would need to adapt to for Big Sur.
Any ideas what we're doing wrong here?