The Hello Avatar prints ok but the image that is to follow doesn't.
Is it possible to move from PdfContentByte in part of the pdf to the
default in other area.
PdfContentByte cb = writer.getDirectContent();
BaseFont bf = BaseFont.createFont(
BaseFont.TIMES_BOLD, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED);
cb.saveState(); // q
cb.beginText(); // BT
cb.moveText(336, 746); // 36 806 Td
cb.moveText(0, -18); // 0 -18 Td
cb.setFontAndSize(bf, 18); // /F1 12 Tf
cb.showText("Hello Avatar!"); // (Hello World)Tj
cb.endText(); // ET
// don't know if this is working because the image
isn't visible
// cb.moveTo(0, -18);
// not visible in the pdf
// cb.addImage(barimg);
cb.restoreState();
document.add(new Paragraph("Hello World!"));
// this displays the image if the previous code is
disabled
document.add(barimg);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php