Пример #1
0
 /// <summary>
 /// Instantiates a new
 /// <see cref="ConverterProperties"/>
 /// instance based on another
 /// <see cref="ConverterProperties"/>
 /// instance
 /// (copy constructor).
 /// </summary>
 /// <param name="other">
 /// the other
 /// <see cref="ConverterProperties"/>
 /// instance
 /// </param>
 public ConverterProperties(iText.Html2pdf.ConverterProperties other)
 {
     this.mediaDeviceDescription = other.mediaDeviceDescription;
     this.fontProvider           = other.fontProvider;
     this.tagWorkerFactory       = other.tagWorkerFactory;
     this.cssApplierFactory      = other.cssApplierFactory;
     this.baseUri        = other.baseUri;
     this.createAcroForm = other.createAcroForm;
     this.outlineHandler = other.outlineHandler;
     this.charset        = other.charset;
     this.metaInfo       = other.metaInfo;
 }
 /// <summary>
 /// Instantiates a new
 /// <see cref="ProcessorContext"/>
 /// instance.
 /// </summary>
 /// <param name="converterProperties">
 /// a
 /// <see cref="iText.Html2pdf.ConverterProperties"/>
 /// instance
 /// </param>
 public ProcessorContext(ConverterProperties converterProperties)
 {
     if (converterProperties == null)
     {
         converterProperties = new ConverterProperties();
     }
     state             = new State();
     deviceDescription = converterProperties.GetMediaDeviceDescription();
     if (deviceDescription == null)
     {
         deviceDescription = MediaDeviceDescription.GetDefault();
     }
     fontProvider = converterProperties.GetFontProvider();
     if (fontProvider == null)
     {
         fontProvider = new DefaultFontProvider();
     }
     tagWorkerFactory = converterProperties.GetTagWorkerFactory();
     if (tagWorkerFactory == null)
     {
         tagWorkerFactory = DefaultTagWorkerFactory.GetInstance();
     }
     cssApplierFactory = converterProperties.GetCssApplierFactory();
     if (cssApplierFactory == null)
     {
         cssApplierFactory = DefaultCssApplierFactory.GetInstance();
     }
     baseUri = converterProperties.GetBaseUri();
     if (baseUri == null)
     {
         baseUri = "";
     }
     outlineHandler = converterProperties.GetOutlineHandler();
     if (outlineHandler == null)
     {
         outlineHandler = new OutlineHandler();
     }
     resourceResolver      = new HtmlResourceResolver(baseUri, this, converterProperties.GetResourceRetriever());
     limitOfLayouts        = converterProperties.GetLimitOfLayouts();
     cssContext            = new CssContext();
     linkContext           = new LinkContext();
     createAcroForm        = converterProperties.IsCreateAcroForm();
     formFieldNameResolver = new FormFieldNameResolver();
     radioCheckResolver    = new RadioCheckResolver();
     immediateFlush        = converterProperties.IsImmediateFlush();
     metaInfo            = converterProperties.GetEventCountingMetaInfo();
     processingInlineSvg = false;
 }
 /// <summary>Sets the CSS applier factory.</summary>
 /// <remarks>
 /// Sets the CSS applier factory.
 /// <para />
 /// The cssApplierFactory is used to create
 /// <see cref="iText.Html2pdf.Css.Apply.ICssApplier"/>
 /// , which in turn
 /// are used to convert the CSS properties to the PDF properties.
 /// </remarks>
 /// <param name="cssApplierFactory">the CSS applier factory</param>
 /// <returns>
 /// the
 /// <see cref="ConverterProperties"/>
 /// instance
 /// </returns>
 public virtual iText.Html2pdf.ConverterProperties SetCssApplierFactory(ICssApplierFactory cssApplierFactory
                                                                        )
 {
     this.cssApplierFactory = cssApplierFactory;
     return(this);
 }