size = PageSize.A0.rotate();
}
Document document = new Document(size, 15, 15, 10, 10);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PdfWriter writer = PdfWriter.getInstance(document, baos);
document.open();
populatePdf(document, writer, qr);
// do we want to add a svg image?
if (StringUtils.isNotBlank(svg)) {
document.newPage();
StringBuffer s1 = new StringBuffer(svg);
if (!svg.startsWith("<svg xmlns=\"http://www.w3.org/2000/svg\" ")) {
s1.insert(s1.indexOf("<svg") + 4, " xmlns='http://www.w3.org/2000/svg'");
}
String t = "<?xml version='1.0' encoding='ISO-8859-1'"
+ " standalone='no'?>" + s1.toString();
PdfContentByte cb = writer.getDirectContent();
cb.saveState();
cb.concatCTM(1.0f, 0, 0, 1.0f, 36, 0);
float width = document.getPageSize().getWidth() - 20;
float height = document.getPageSize().getHeight() - 20;
Graphics2D g2 = cb.createGraphics(width, height);