public static void generatePdf(OutputStream os)
throws IOException, DocumentException,
com.lowagie.text.DocumentException {
ITextRenderer renderer = new ITextRenderer();
String buffer="<html><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO 9TXL0Y4OHwAAAABJRU5ErkJggg==' /></html>";
renderer.setDocumentFromString(getEscapedString(buffer));
renderer.layout();
renderer.createPDF(os, true);
renderer.finishPDF();
os.flush();
os.close();
log.info("---------------------End generatePdf method---------------------");
}