Does PDFsharp with MigraDoc support HTML syntax?

為{幸葍}努か 提交于 2019-12-12 18:24:43

问题


Does PDFsharp with MigraDoc support HTML syntax?

<a> <strong> etc.

If yes, how can I implement it on the document?


回答1:


No, it doesn't support HTML directly. You have to write a code that reads the HTML and create the PDF using either MigraDoc or PdfSharp.

To create the PDF, you need to use the API, for instance: .AddPage(...), .Draw(...), .DrawRectangle(...)

You have a full example here.

You can also use this project to convert HTML to PDF: https://wkhtmltopdf.org/




回答2:


For example:

para1.AddFormattedText("this text in bold", TextFormat.Bold);


来源:https://stackoverflow.com/questions/20007911/does-pdfsharp-with-migradoc-support-html-syntax

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!