我使用iText的用于.NET和我得到一个PdfAConformanceException
与消息:
“所有的字体都必须嵌入这个人是不是:黑体”
如何能够将黑体?
这是我的代码
static void Main(string[] args)
{
ConverterProperties properties = new ConverterProperties();
properties.SetBaseUri(null);
PdfWriter writer = new PdfWriter("hello.pdf");
PdfADocument pdf = new PdfADocument(writer,
PdfAConformanceLevel.PDF_A_3A, new PdfOutputIntent("Custom", "", "http://www.color.org", "sRGB IEC61966-2.1", new StreamReader(INTENT).BaseStream));
pdf.SetTagged();
var html = @"<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
";
HtmlConverter.ConvertToPdf(html, pdf, properties);
}