The SET PRINT OPTION command allows a print job to be saved to a file on disk. This can very beneficial in a case where the current computer is not directly connected to a printer. Saving the print job to a file on disk will allow the user to print the file at a later time without having to regenerate the print job. Here is an example of using the command:
SET PRINT OPTION(Destination option;2)
Using the Destination Option (9) for the option parameter and 2 for the value1 parameter will generate a file. A third optional parameter value2 is the path where the file will be saved. As shown above, the third parameter is not passed, thus 4D will prompt a dialog requesting a file name. This file is saved in the same directory as the 4D application.