Does the library PDFSharp can - like iTextSharp - generate PDF files *take into account HTML formatting *? (bold (strong), spacing (br), etc.)
Previously I used iTextSharp and roughly handled in such a way (code below):
string encodingMetaTag = "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />";
string htmlCode = "text <div> <b> bold </ b> or <u> underlined </ u> <div/>";
var sr = new StringReader (encodingMetaTag + htmlCode);
var pdfDoc = new Document (PageSize.A4, 10f, 10f, 10f, 0f);
var = new HTMLWorker htmlparser (pdfDoc);
PdfWriter.GetInstance (pdfDoc, HttpContext.Current.Response.OutputStream);
pdfDoc.Open ();
htmlparser.Parse (sr);
pdfDoc.Close ();
incorporated into the appropriate HTML form to a PDF document dealt with the class object HTMLWorker.. so what with PDFSharp? Has PDFSharp similar solution?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…