Set the name of a print job

Whenever I create a print job, the job gets the name of the window where the code that generated it is.
So, if I “print” to PDF, the name defaults to the name of the window. The worse case is if I decide to “Open in Preview” (I’m on a Mac), the generated document that opens in Preview has the name of the window where the printing code is.
How can I define the name of the print job to whatever I want?

old problem… the only workaround today is to rename the front window before printing,
and put its name back after printing.

Thank you for the fast reply.
This is really a nuisance. But, I will try to implement it in an elegant way.

may be with mbs plugin you can set the name of the print job (pretty sure)
but with xojo only you can’t.