Does Core suite support converting HTML file to accessible PDFs ?
Does Core suite support accessible PDFs from HTML
Re: Does Core suite support accessible PDFs from HTML
Support · Mar 12, 2021Hello,
Yes, DynamicPDF Core Suite for .NET supports creating accessible PDFs from HTML text or file. You will need to enable tagging for the Document using the Tag property. Also please note that HtmlArea supports tags and properties based on HTML 4.0.1 and the CSS 2.1 specification, including some limitations. Please refer to the documentation on HtmlArea here
.
Here is a code sample:
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
document.Tag = new TagOptions();
var html = "<html>" +
"<head>" +
"<style>" +
"h1 {color:red;}" +
"p {color:blue;}" +
"</style>" +
"</head>" +
"<body>" +
"<h1>A heading</h1>" +
"<p>A paragraph.</p>" +
"</body>" +
"</html>";
var htmlArea = new HtmlArea(html, 0, 0, 500, 500);
page.Elements.Add(htmlArea);
String output = "Output PDF file path";
document.Draw(output);
Thanks,
ceTe Software Support Team