Exemplo n.º 1
0
        protected override void ParseDeviceInfo(ref NameValueCollection deviceInfo)
        {
            if (deviceInfo == null)
            {
                return;
            }
            for (int i = 0; i < deviceInfo.Count; i++)
            {
                string text  = deviceInfo.Keys[i];
                string text2 = deviceInfo[i];
                switch (text.ToUpper(CultureInfo.InvariantCulture))
                {
                case "HUMANREADABLEPDF":
                    m_humanReadablePDF = RendererBase.ParseDeviceInfoBoolean(text2, defaultValue: false);
                    break;

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

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

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