public const String INTENT = "sRGB Color Space Profile.icm";
static void Main(string[] args)
{
String HTML = "<h1>Test</h1><p>Hello World</p>";
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 FileStream(INTENT, FileMode.Open)));
pdf.SetTagged();
ConverterProperties properties = new ConverterProperties();
properties.SetBaseUri("");
HtmlConverter.ConvertToPdf(HTML, pdf, properties);
}
When I run this code, I get a PdfAConformanceException "All the fonts must be embedded. This one is not: Times-Bold".
I try to get the registered fonts through these lines:
var fonts = "";
foreach (string fontname in iTextSharp.text.FontFactory.RegisteredFonts)
{
fonts += fontname + " ";
}
and i get: "courier courier-bold courier-oblique courier-boldoblique helvetica helvetica-bold helvetica-oblique helvetica-boldoblique symbol times-roman times-bold times-italic times-bolditalic zapfdingbats", so times-bold is in there.
Am I missing something?