Hi,

I'm trying to embed a chunk of HTML code in a PDF document and am having
difficulties changing the default font.

The XML that I'm sending the parser is the following:

<span style='font-family: Times-Roman; font-size: 12.0px;'>
<p>Moo!</p>
</span>


However, this results in no corresponding output in the PDF document. The
code I'm using is as follows:

String htmlContent = "<p>Moo!</p>";
StringReader reader = new StringReader("<span style='font-family:
Times-Roman; font-size: 12.0px;'>" + htmlContent + "</span>");
                        
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
parser.parse(new InputSource(reader), new
SAXmyHtmlHandler(wrapper.document));    


Any help would be appreciated.

Regards,
Matt

_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to