Beispiel #1
0
        /// <summary>
        /// Constructs HTML to PDF converter instance from <code>GlobalConfig</code>.
        /// </summary>
        /// <param name="config">global configuration object</param>
        public SimplePechkin(GlobalConfig config)
        {
            if (_log.IsTraceEnabled)
            {
                _log.Trace("T:" + Thread.CurrentThread.Name + " Creating SimplePechkin");
            }

            // create and STORE delegates to protect them from GC
            _errorCallback           = OnError;
            _finishedCallback        = OnFinished;
            _phaseChangedCallback    = OnPhaseChanged;
            _progressChangedCallback = OnProgressChanged;
            _warningCallback         = OnWarning;

            PechkinStatic.InitLib(false);

            _globalConfig = config;

            if (_log.IsTraceEnabled)
            {
                _log.Trace("T:" + Thread.CurrentThread.Name + " Created global config");
            }

            CreateConverter();
        }