Home > BSPrinter documentation > Reference

ShowSaveToFile Method


Applies to: PrintPreview control , IPrinterEx object


Return Type: BSGeneralDialogResultConstants
Parameter(s):
In          Required          DeviceNameToUse          As String
In          Required          DefaultFileNameOrPath          As String
In          Optional          RememberLastPath          As Boolean          Default value: True
In          Optional          OverwritePrompt          As Boolean          Default value: True


Description:

It saves the document to a file instead of printing it.
It is similar to the SaveToFile method, but in this case the user is asked where to save the file.

It should be used only with printers drivers that produce a meaningful output file.
The file format and its corresponding extension depends on the printer driver. Most drivers will produce an intermediate file that is used by the spooling system, such as PostScript files, but some printers driver can produce a useful output such as PDF files or XPS files.
In Windows 10, the "Microsoft Print to PDF" driver produces a PDF file, whereas "Microsoft XPS Document Writer" outputs XPS files.

Parameters explained:

DeviceNameToUse is the printer driver to be used.

FileFullPath is the full path of the output file.

Notes: Some printer drivers might show additional dialogs on the operation.
If the printer driver is not installed the end user will get a message telling that the file cannot be saved because the printer driver is not installed.
You can use the PrinterExists method to check whether a particular printer driver is installed.

See Also:

SaveToFile method.