Hi there,
I’m trying to print from a thread in a desktop app.
I’m using MBS plugin with NSPrintInfoMBS to change printer setup and sometimes redirect printing to a pdf file, that’s easy.
Unfortunately, when using the following in a thread
g = PrinterSetup.OpenPrinter(ps)
the app crashes because the OS shows a small progress window.
I’m seeking a solution and found that NSPrintOperationMBS has a property called showsProgressPanel that can be set to false.
By changing the MBS NSPrintOperationMBS example and setting showsProgressPanel to false this progress window is not displayed.
Now it seems I could use NSPrintInfoMBS.setUpPrintOperationDefaultValues method to set NSPrintOperationMBS.showsProgressPanel to false before using PrinterSetup.OpenPrinter.
Maybe that could solve my thread problem.
Documentation says:
Function: Validates the attributes encapsulated by the receiver.
Notes: Invoked when the print operation is about to start. Subclasses may override this method to set default values for any attributes that are not set.
But I have no clue on how to do this.
If not @Christian_Schmitz maybe someone can tell me how it works.
Any hint welcome !
Thanks.