示例#1
0
 protected virtual PdfShapeHtmlWriter CreateShapeWriter(HtmlWriterConfig config)
 {
     if (config.UseCanvas)
     {
         return(new PdfShapeCanvasHtmlWriter());
     }
     else
     {
         return(new PdfShapeSvgHtmlWriter());
     }
 }
示例#2
0
        public PdfHtmlWriter(HtmlWriterConfig config = null)
        {
            if (config == null)
            {
                config = new HtmlWriterConfig();
            }

            if (config.DrawShapes)
            {
                shapeWriter = CreateShapeWriter(config);
            }
            textWriter  = CreateTextWriter();
            imageWriter = CreateImageWriter(config);
        }
示例#3
0
 protected virtual PdfImageHtmlWriter CreateImageWriter(HtmlWriterConfig config)
 => new PdfImageHtmlWriter(config.EmbeddedImages, config.DirImages);