Article | 60001076 |
Type | HowTo |
Product | Engine |
Version | 6 |
Date Added | 2/9/2010 |
Submitted by | Mark Duff |
Keywords |
In order to make your print-outs faster you need to select a common vdPrint object for all the drawings.
//A common printer for all drawings.
VectorDraw.Professional.vdObjects.
vdPrint mPrinter = new VectorDraw.Professional.vdObjects.vdPrint();
void SelectPrinter()
{
mPrinter.SetUnRegisterDocument(vdDrawingManager.BaseControl.ActiveDocument);
mPrinter.PrinterName = "";//The default system printer
mPrinter.SelectPaper(
"PRINTER-DEFAULT");//The default paper of selected system printermPrinter.OutInBlackWhite =
true;mPrinter.LandScape =
true; //here you can change some additional properties for selected printer like Margings Resolution copiesmPrinter.UpdatePrinterFromProperties();
//this will update the internally selected System.Drawing.Printing.PrintDocument}
void Print(vdDocument document)
{
mPrinter.DocumentName =
"Printing Example(" + document.FileName +")";mPrinter.SetLayout(document.ActiveLayOut);
mPrinter.PrintExtents();
mPrinter.PrintScaleToFit();
mPrinter.PrintOut();
mPrinter.SetLayout(null);}