Call:
PdfWriter.setRgbTransparencyBlending(true);
Paulo
________________________________
From: Craig Edwards [mailto:[email protected]]
Sent: Monday, January 16, 2012 3:46 AM
To: [email protected]
Subject: [iText-questions] Washed out (transparent) image
Hello fellow iTexters...
One the images that I am embedding in my PDF appears washed out in the final
output. The simplest test case is as follows:
Document doc = new Document(PageSize.A4);
PdfWriter.getInstance(doc, new FileOutputStream(new
File("washout.pdf")));
doc.open();
doc.add(Image.getInstance("checkpoints.png"));
doc.close();
The image appears in the PDF, but the colours are not the same as if you just
view the image directly. Note that I normally scale the image so that it fits
on the page, but I wanted to make the test case as simple as possible (you can
see the problem both with and without scaling).
I've attached the image and the resulting PDF, and they are also downloadable
from the following URLs in case they don't make it through:
http://dl.dropbox.com/u/48589982/checkpoints.png
http://dl.dropbox.com/u/48589982/washout.pdf
My initial googling suggests that I may need to set the color space, but I am
not 100% sure if a) that is really the problem and b) exactly what the sequence
of iText APIs I need to call if it is. Any thoughts/advice would be most
welcome. Thanks a lot.
Craig
This email message and any accompanying attachments may contain information
that is confidential and is subject to legal privilege. If you are not the
intended recipient, do not read, use, disseminate, distribute or copy this
message or attachments. If you have received this message in error, please
notify the sender immediately and delete this message. Any views expressed in
this message are those of the individual sender, except where the sender
expressly, and with authority, states them to be the views of AMP. Before
opening any attachments, please check them for viruses and defects.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php