I have added a popup annotation to a PDF and I am trying to change the appearance of it using a bitmap image. My bit map image does appear but it seems to change the position of annotation. Below is a code snippet of how I am changing the appearance along with links to two pdfs.. one that shows the position of that annotation when i DONT change the appearance and another that shows the position change if I do in fact change the appearance. Notice how the annotation seems to drop down the page when i change the appearance.
private void setAnnotationImage(PdfAnnotation annotation, Image image, PdfWriter writer) { image.setAbsolutePosition(0,0); PdfAppearance app = writer.getDirectContent().createAppearance(image.getWidth(), image.getHeight()); app.addImage(image); annotation.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, app); annotation.setFlags(PdfAnnotation.FLAGS_PRINT); } PDF with popup annotation with default appearance: http://home.fuse.net/mikebrungs/without.pdf PDF with popup annotation + code above: http://home.fuse.net/mikebrungs/with.pdf The image is a 39 x 39 bitmap -- View this message in context: http://www.nabble.com/Problem-changing-appearance-of-PdfAnnotation-%28popup%29-tp19760240p19760240.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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 iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php