Esempio n. 1
0
        private EMFDeviceInfo getEMFDeviceInfo(PrintSetting printSetting)
        {
            EMFDeviceInfo emfdi = new EMFDeviceInfo();

            emfdi.Landscape    = printSetting.Orientation == "V" ? false : true;
            emfdi.PageWidth    = System.Convert.ToDecimal(printSetting.PaperWidth);
            emfdi.PageHeight   = System.Convert.ToDecimal(printSetting.PaperHeight);
            emfdi.MarginTop    = System.Convert.ToDecimal(printSetting.MarginTop);
            emfdi.MarginBottom = System.Convert.ToDecimal(printSetting.MarginBottom);
            emfdi.MarginLeft   = System.Convert.ToDecimal(printSetting.MarginLeft);
            emfdi.MarginRight  = System.Convert.ToDecimal(printSetting.MarginRight);

            return(emfdi);
        }
Esempio n. 2
0
        private void Export(LocalReport Report)
        {
            EMFDeviceInfo emfdi = this.getEMFDeviceInfo(this.printSetting);

            string strDeviceInfo = emfdi.DeviceInfoString;

            emfdi = null;
            Microsoft.Reporting.WinForms.Warning[] Warnings;

            this.m_EMFStreams = new System.Collections.Generic.List <System.IO.Stream>();

            Report.Render("Image", strDeviceInfo, this.CreateStream, out Warnings);

            foreach (System.IO.Stream s in this.m_EMFStreams)
            {
                s.Position = 0;
            }
        }