示例#1
0
        protected override void ParseDeviceInfo(ref NameValueCollection deviceInfo)
        {
            if (deviceInfo != null)
            {
                for (int i = 0; i < deviceInfo.Count; i++)
                {
                    string text  = deviceInfo.Keys[i];
                    string text2 = deviceInfo[i];
                    switch (text.ToUpper(CultureInfo.InvariantCulture))
                    {
                    case "HUMANREADABLEPDF":
                        this.m_humanReadablePDF = RendererBase.ParseDeviceInfoBoolean(text2, false);
                        break;

                    case "PRINTONOPEN":
                        this.m_printOnOpen = RendererBase.ParseDeviceInfoBoolean(text2, false);
                        break;

                    case "EMBEDFONTS":
                        this.m_embedFonts = PDFRenderer.ParseDeviceInfoFontEmbedding(text2, FontEmbedding.Subset);
                        break;

                    case "TEST":
                        this.m_test = RendererBase.ParseDeviceInfoBoolean(text2, false);
                        break;
                    }
                }
            }
        }
        protected override void ParseDeviceInfo(ref NameValueCollection deviceInfo)
        {
            if (deviceInfo != null)
            {
                for (int i = 0; i < deviceInfo.Count; i++)
                {
                    string text     = deviceInfo.Keys[i];
                    string intValue = deviceInfo[i];
                    switch (text.ToUpper(CultureInfo.InvariantCulture))
                    {
                    case "PRINTDPIX":
                        this.m_printDpiX = RendererBase.ParseDeviceInfoInt32(intValue, 300);
                        this.ValidatePrintDpiValue(ref this.m_printDpiX, 300);
                        break;

                    case "PRINTDPIY":
                        this.m_printDpiY = RendererBase.ParseDeviceInfoInt32(intValue, 300);
                        this.ValidatePrintDpiValue(ref this.m_printDpiY, 300);
                        break;
                    }
                }
            }
        }