return null;
}
public static byte[] createPdf(String html, String header, String footer, String css, Boolean showAllSelectOptions, Boolean repeatHeader, Boolean repeatFooter) {
try {
ITextRenderer r = getRenderer();
synchronized (r) {
html = formatHtml(html, header, footer, css, showAllSelectOptions, repeatHeader, repeatFooter);
final DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setValidating(false);
DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
builder.setEntityResolver(FSEntityResolver.instance());
org.w3c.dom.Document xmlDoc = builder.parse(new ByteArrayInputStream(html.getBytes("UTF-8")));
r.setDocument(xmlDoc, null);
ByteArrayOutputStream os = new ByteArrayOutputStream();
r.layout();
r.createPDF(os);
byte[] output = os.toByteArray();
os.close();
return output;
}
} catch (Exception e) {