/// <summary> /// constructor /// /// </summary> public TPrinter() : base() { FOrientation = eOrientation.ePortrait; PrintingMode = ePrintingMode.eDoPrint; FMarginType = eMarginType.eDefaultMargins; CurrentPageNr = 0; FNumberOfPages = 0; CurrentFont = eFont.eDefaultFont; FPageFooterSpace = 0; }
/// <summary> /// set the orientation of the page /// </summary> public override void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) { base.Init(AOrientation, APrinterLayout, AMarginType); // FWidth: don't try to fit on a page at the moment FWidth = DEFAULT_LENGTH_LINE; FLeftMargin = 0; FRightMargin = 0; CurrentPageNr = 1; }
/// <summary> /// set the orientation of the page /// </summary> public override void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) { base.Init(AOrientation, APrinterLayout, AMarginType); // FWidth: don't try to fit on a page at the moment FWidth = DEFAULT_LENGTH_LINE; FLeftMargin = 0; FRightMargin = 0; CurrentPageNr = 1; }
/// <summary> /// todoComment /// </summary> public override void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) { base.Init(AOrientation, APrinterLayout, AMarginType); // SetPageSize(); }
/// <summary> /// todoComment /// </summary> public override void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) { base.Init(AOrientation, APrinterLayout, AMarginType); SetPageSize(); if (AOrientation == eOrientation.ePortrait) { FDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Top = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Bottom = Convert.ToInt32(Cm2Inch(1) * 100); } else if (AOrientation == eOrientation.eLandscape) { FDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(Cm2Inch(1) * 100); FDocument.DefaultPageSettings.Margins.Top = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Bottom = Convert.ToInt32(Cm2Inch(0.5f) * 100); } // Associate the eventhandling method with the // document's PrintPage event. FDocument.PrintPage += new PrintPageEventHandler(this.PrintPage); FDocument.BeginPrint += new PrintEventHandler(this.BeginPrint); FDocument.EndPrint += new PrintEventHandler(this.EndPrint); FDocument.DefaultPageSettings.Landscape = (FOrientation == eOrientation.eLandscape); }
/// <summary> /// sets the orientation of the page /// </summary> public virtual void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) { FPrinterLayout = APrinterLayout; FOrientation = AOrientation; FMarginType = AMarginType; }
/// <summary> /// sets the orientation of the page /// </summary> public virtual void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) { FPrinterLayout = APrinterLayout; FOrientation = AOrientation; FMarginType = AMarginType; }
/// <summary> /// constructor /// /// </summary> public TPrinter() : base() { FOrientation = eOrientation.ePortrait; PrintingMode = ePrintingMode.eDoPrint; FMarginType = eMarginType.eDefaultMargins; CurrentPageNr = 0; FNumberOfPages = 0; CurrentFont = eFont.eDefaultFont; FPageFooterSpace = 0; }
/// <summary> /// todoComment /// </summary> public override void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType) { base.Init(AOrientation, APrinterLayout, AMarginType); SetPageSize(); if (AOrientation == eOrientation.ePortrait) { FDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Top = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Bottom = Convert.ToInt32(Cm2Inch(1) * 100); } else if (AOrientation == eOrientation.eLandscape) { FDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(Cm2Inch(1) * 100); FDocument.DefaultPageSettings.Margins.Top = Convert.ToInt32(Cm2Inch(0.5f) * 100); FDocument.DefaultPageSettings.Margins.Bottom = Convert.ToInt32(Cm2Inch(0.5f) * 100); } // Associate the eventhandling method with the // document's PrintPage event. FDocument.PrintPage += new PrintPageEventHandler(this.PrintPage); FDocument.BeginPrint += new PrintEventHandler(this.BeginPrint); FDocument.EndPrint += new PrintEventHandler(this.EndPrint); FDocument.DefaultPageSettings.Landscape = (FOrientation == eOrientation.eLandscape); }