PrintFile()

Syntax:

PrintFile( Filename, PrintDialog, CancelDialog )

Parameters:

Filename – the name of the file to print. This parameter is required.

PrintDialog – display the printer poperties dialog box before printing. PrintDialog can be true or false. If true the print dialog box will appear. If false, the print dialog will not appear. This parameter is optional and the default is false.

CancelDialog - display the cancel dialog box while the page is printing. CancelDialog can be true or false. If true, the cancel dialog will appear. If false, the cancel dialog will not appear. This parameter is optional and the default is true.

Landscape – print the page in landscape format unless overridden by the user via the Print Dialog if provided. The options are true or false. If false the output will default to portrait orientation. This parameter is optional and the default is true.

ScaleToFit – ensure the output is reduced or enlarged so that it fits fully on the page. If false the output will use the Quality setting to decide the size of the output. This parameter is optional and the default is false.

CentreView – positions the output in the centre of the page. Not applicable if the ScaleToFit option is true. This parameter is optional and the default is false.

Quality – sets the resolution used to create the output. Options are number 0 to 4 where 0=lowest, 1=150dpi, 2=300dpi, 3=600dpi, 4=highest possible. This parameter is optional and the default is 2 (300dpi).

MarginLeft, MarginRight, MarginTop, MarginBottom – sets the distance, in cms, for the margins to leave around the output. This option is only applicable if ScaleToFit is true.

Remarks:

This function will print the specified file.

image\Script_Button.jpgExamples