How to force the printer output to pdf or mail ?

Hi Group,

is it possible (on the mac) to force the output of a printing process to preview or to mail ?
these are print options the user can choose on the bottom of the print dialog
but can it be done without the user ?

thanks.

Maybe this helps?
https://www.mbsplugins.de/archive/2014-02-24/Print_to_PDF_File_on_Mac_OS_X_

or this
https://www.mbsplugins.de/archive/2015-04-30/Tip_of_day_Save_Xojo_report_to