示例#1
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);
        }
示例#2
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;
        }
示例#3
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;
        }
示例#4
0
        /// <summary>
        /// todoComment
        /// </summary>
        public override void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType)
        {
            base.Init(AOrientation, APrinterLayout, AMarginType);
//            SetPageSize();
        }
示例#5
0
 /// <summary>
 /// sets the orientation of the page
 /// </summary>
 public virtual void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType)
 {
     FPrinterLayout = APrinterLayout;
     FOrientation   = AOrientation;
     FMarginType    = AMarginType;
 }
示例#6
0
 /// <summary>
 /// sets the orientation of the page
 /// </summary>
 public virtual void Init(eOrientation AOrientation, TPrinterLayout APrinterLayout, eMarginType AMarginType)
 {
     FPrinterLayout = APrinterLayout;
     FOrientation = AOrientation;
     FMarginType = AMarginType;
 }
示例#7
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);
        }