Print dialog issues with objective-c projects on Sonoma

Hello,

I have some older objective-c projects that are about creating reports of tables and gantt charts and printing those reports. They work fine on Ventura and BigSur, but after upgrading to Sonoma, I encountered some problems with the Print dialog and options.

Specifically, the page preview is not working, and the Close button does not close the dialog and is not responsive. I have to force quit the app to exit the Print dialog. This makes it impossible to print my reports properly.

I wonder if this is a bug with Sonoma or with objective-c, and if there is any workaround or fix for this issue. I appreciate any help or advice from the community or the Apple support team.

Thank you.