Hello,
I am having a probject with a transparent GIF. When I run the code listed below the image is displayed on the PDf with a gray background instead of a transparent background.
public static void main(String[] args) throws Exception {
Document document = new Document();
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("C:\\Test\\itext.pdf"));
document.open();
PdfContentByte cb = writer.getDirectContent(); cb.saveState(); cb.concatCTM(1, 0, 0, 1, 50, 400);
Graphics2D ig = cb.createGraphics(500, 500);
Image image = Toolkit.getDefaultToolkit().getImage("<<transparent image>>");
ig.drawImage(image, 50,50, null);
ig.dispose(); cb.restoreState();
document.close();
}
When I place the image in a JLabel using an ImageIcon, the image is transparent when displayed in a JFrame or printed. However, when I call the paint() method of the JLabel with the PDFGraphics2D, the image still has a gray background. Is this a bug, or am I doing something wrong? Please let me know what I can do.
Thank You, Alan Smoke
_________________________________________________________________
Get MSN 8 and enjoy automatic e-mail virus protection. http://join.msn.com/?page=features/virus
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions