PrintToPrinter

Top  Previous  Next

 

PrintToPrinter (Method)

 

Prints the drawing into a printer

 

Syntax:

Function PrintToPrinter(sPrinterName As String, avPaperSize As AvaxPaperSize, UnitMM As Single, xAvaxMin As Single, yAvaxMin As Single, xAvaxMax As Single, yAvaxMax As Single, fSelected As Boolean, fLandScape As Boolean, fExtends As Boolean, fPrinterDialogOn As Boolean, sBmpFiles() As String) As Boolean

 

The PrintToPrinter method syntax consists of the following:

Parameter

Data Type

Description

sPrinterName

String

Is the printer name

avPaperSize

AvaxPaperSize

An expression that defines the paper size

UnitMM

Single

Is the number of mm equal to one drawing unit

xAvaxMin

Single

Is the x coordinate of the left bottom drawing extents that will be printed

yAvaxMin

Single

Is the y coordinate of the left bottom drawing extents that will be printed

xAvaxMax

Single

Is the x coordinate of the right top drawing extents that will be printed

yAvaxMax

Single

Is the y coordinate of the right top drawing extents that will be printed

fSelected

Boolean

A Boolean expression that if it is true then only the selected objects are printed

fLandScape

Boolean

A Boolean expression that if it is true then the printer will print in landscape mode

fExtends

Boolean

A Boolean expression that if it is true then print scale is fit to page irrespective of the selected print scale

fPrinterDialogOn

Boolean

A Boolean expression that if it is true then a window dialog appears to select a printer and paper type

sBmpFiles()

String

 

 

Return value:

Boolean - True on success, false on error.

 

Remarks:

If all the xAvaxMin, yAvaxMin, xAvaxMax and yAvaxMax are zero, then the whole drawing will be printed

 

Example