Class PrintOut
Base class for print drivers define the funtions to be implemented by
any print driver (Report processing driver)
Assembly: Reportman.Drawing.dll
Syntax
public abstract class PrintOut
Constructors
PrintOut()
Constructor, set default values only
Declaration
Fields
Copies
Number of copies, by default 1
Declaration
Field Value
Declaration
public MetaFile CurrentMetafile
Field Value
DefaultPrinterName
Declaration
public static string DefaultPrinterName
Field Value
DrawFound
Internally determines if the searched texts must be drawn as a selection.
Used in preview.
Declaration
Field Value
EmptyReportThrowException
Throw exception when there is no data available to print
Declaration
public bool EmptyReportThrowException
Field Value
FOrientation
Default orientation, by default Portrait
Declaration
protected OrientationType FOrientation
Field Value
ForcePrinterName
Declaration
public string ForcePrinterName
Field Value
FromPage
Starting page, by default 1
Declaration
Field Value
NoData
Declaration
public NoDataToPrintEvent NoData
Field Value
PRINTOUT_MAX_PAGES
Maximum number of pages allowed (this is to avoid stack overflow recursions)
Declaration
protected int PRINTOUT_MAX_PAGES
Field Value
PageSizeArray
Array of predefined page sizes
Declaration
public static int[,] PageSizeArray
Field Value
Previewing
Declaration
Field Value
ToPage
End page, by default, the maximum
Declaration
Field Value
Methods
Dispose()
Free memory consumed by graphics resources
Declaration
public virtual void Dispose()
Declaration
public virtual void DrawChart(Series nseries, MetaFile ametafile, int posx, int posy, object achart)
Parameters
DrawPage(MetaFile, MetaPage)
The driver should draw the page
Declaration
public abstract void DrawPage(MetaFile meta, MetaPage page)
Parameters
The driver should do cleanup here, a print driver should finish print document.
Declaration
public virtual void EndDocument(MetaFile meta)
Parameters
EndPage(MetaFile)
The driver should end current page
Declaration
public virtual void EndPage(MetaFile meta)
Parameters
GetPageSize(out int)
The driver must return the default page size
Declaration
public abstract Point GetPageSize(out int indexqt)
Parameters
| Type |
Name |
Description |
| int |
indexqt |
|
Returns
GraphicExtent(MemoryStream, Point, int)
The driver must return the image extent in twips
Declaration
public abstract Point GraphicExtent(MemoryStream astream, Point extent, int dpi)
Parameters
Returns
The driver should do initialization here, a print driver should start a print document,
while a preview driver should initialize a bitmap
Declaration
public virtual void NewDocument(MetaFile meta)
Parameters
NewPage(MetaFile, MetaPage)
The driver should start a new page
Declaration
public virtual void NewPage(MetaFile meta, MetaPage page)
Parameters
PageSizeName(int)
Returns page size name for provided index
Declaration
public static string PageSizeName(int index)
Parameters
| Type |
Name |
Description |
| int |
index |
Index inside page size array
|
Returns
| Type |
Description |
| string |
String result, containing page size name
|
Print initialization, it calls Metafile.BeginPrint, and NewDocument for this driver
Declaration
public virtual bool PreparePrint(MetaFile meta)
Parameters
Returns
Print method, it the PreparePrint, the driver should override this to perform additional
actions
Declaration
public virtual bool Print(MetaFile meta)
Parameters
Returns
ProcessNoDataToPrint()
This procedure is called when the user does not handle the
no data to print event. Depending on the ouput driver the output
will be a message to the user.
Declaration
protected virtual void ProcessNoDataToPrint()
SelectPrinter(PrinterSelectType)
The driver must select a printer
Declaration
public virtual void SelectPrinter(PrinterSelectType PrinterSelect)
Parameters
SetOrientation(OrientationType)
Declaration
public virtual void SetOrientation(OrientationType PageOrientation)
Parameters
SetPageSize(PageSizeDetail)
The driver must set a new page size
Declaration
public abstract Point SetPageSize(PageSizeDetail psize)
Parameters
Returns
TextExtent(TextObjectStruct, Point)
The driver must return the text extent in twips
Declaration
public abstract Point TextExtent(TextObjectStruct aobj, Point extent)
Parameters
Returns