2013-11-15 25 views

回答

3

不,它不直接支持HTML。您必须编写一个代码来读取HTML并使用MigraDoc或PdfSharp创建PDF。

要创建PDF,您需要使用API​​,例如:.AddPage(...).Draw(...).DrawRectangle(...)

你有一个full example here

您也可以使用这个项目将HTML转换成PDF:http://code.google.com/p/wkhtmltopdf/

+0

我知道如何创建和poppulate文件,并没有想用另一个项目转换 – BorHunter

0

例如:

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