protected virtual PdfShapeHtmlWriter CreateShapeWriter(HtmlWriterConfig config) { if (config.UseCanvas) { return(new PdfShapeCanvasHtmlWriter()); } else { return(new PdfShapeSvgHtmlWriter()); } }
public PdfHtmlWriter(HtmlWriterConfig config = null) { if (config == null) { config = new HtmlWriterConfig(); } if (config.DrawShapes) { shapeWriter = CreateShapeWriter(config); } textWriter = CreateTextWriter(); imageWriter = CreateImageWriter(config); }
protected virtual PdfImageHtmlWriter CreateImageWriter(HtmlWriterConfig config) => new PdfImageHtmlWriter(config.EmbeddedImages, config.DirImages);