Ejemplo n.º 1
0
        internal void SetUpGlobalConfig(IntPtr config)
        {
            Tracer.Trace("T:" + Thread.CurrentThread.Name + " Setting up global config (many wkhtmltopdf_set_global_setting)");

            if (_paperSize != null)
            {
                PechkinStatic.SetGlobalSetting(config, "size.paperSize", _paperSize);
            }
            if (_paperWidth != null)
            {
                PechkinStatic.SetGlobalSetting(config, "size.width", _paperWidth);
            }
            if (_paperHeight != null)
            {
                PechkinStatic.SetGlobalSetting(config, "size.height", _paperHeight);
            }
            if (_paperOrientation != null)
            {
                PechkinStatic.SetGlobalSetting(config, "orientation", _paperOrientation);
            }
            if (_colorMode != null)
            {
                PechkinStatic.SetGlobalSetting(config, "colorMode", _colorMode);
            }
            if (_resolution != null)
            {
                PechkinStatic.SetGlobalSetting(config, "resolution", _resolution);
            }
            if (_dpi != null)
            {
                PechkinStatic.SetGlobalSetting(config, "dpi", _dpi);
            }
            if (_pageOffset != null)
            {
                PechkinStatic.SetGlobalSetting(config, "pageOffset", _pageOffset);
            }
            if (_copies != null)
            {
                PechkinStatic.SetGlobalSetting(config, "copies", _copies);
            }
            if (_collate != null)
            {
                PechkinStatic.SetGlobalSetting(config, "collate", _collate);
            }
            if (_outline != null)
            {
                PechkinStatic.SetGlobalSetting(config, "outline", _outline);
            }
            if (_outlineDepth != null)
            {
                PechkinStatic.SetGlobalSetting(config, "outlineDepth", _outlineDepth);
            }
            if (_dumpOutline != null)
            {
                PechkinStatic.SetGlobalSetting(config, "dumpOutline", _dumpOutline);
            }
            if (_output != null)
            {
                PechkinStatic.SetGlobalSetting(config, "out", _output);
            }
            if (_documentTitle != null)
            {
                PechkinStatic.SetGlobalSetting(config, "documentTitle", _documentTitle);
            }
            if (_useCompression != null)
            {
                PechkinStatic.SetGlobalSetting(config, "useCompression", _useCompression);
            }
            if (_marginTop != null)
            {
                PechkinStatic.SetGlobalSetting(config, "margin.top", _marginTop);
            }
            if (_marginRight != null)
            {
                PechkinStatic.SetGlobalSetting(config, "margin.right", _marginRight);
            }
            if (_marginBottom != null)
            {
                PechkinStatic.SetGlobalSetting(config, "margin.bottom", _marginBottom);
            }
            if (_marginLeft != null)
            {
                PechkinStatic.SetGlobalSetting(config, "margin.left", _marginLeft);
            }
            if (_outputFormat != null)
            {
                PechkinStatic.SetGlobalSetting(config, "outputFormat", _outputFormat);
            }
            if (_imageDpi != null)
            {
                PechkinStatic.SetGlobalSetting(config, "imageDPI", _imageDpi);
            }
            if (_imageQuality != null)
            {
                PechkinStatic.SetGlobalSetting(config, "imageQuality", _imageQuality);
            }
            if (_cookieJar != null)
            {
                PechkinStatic.SetGlobalSetting(config, "load.cookieJar", _cookieJar);
            }
        }