I have searched over bunch of sites, and I was unable to find solution for my problem.
This is the problem: I am making PDF's in Java using iText library. Everything works fine except one thing. Transparent PNG images have black/gray border around non-transparent area. I didn't set any borders in code, and actually I have tried to remove them (with no luck).
Can someone help me how to solve this problem?
The closest answer what I have found is: Resizing an image in asp.net without losing the image quality But I cannot (don't know) interpret this code in Java.
My code is pretty big to copy/paste, but these are steps:
- create document
- load image from given path
- manipulate image (resize, rotate, positioning)
- add image to current page
- save pdf file
This is what I have tried also:
- http://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=print_post&node=2157267
- http://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=print_post&node=2330200
- I have tried more than those 2, but I didn't bookmarked them (none of them worked)
Thanks in advance
UPDATE: I forgot to mention that my original pictures don't have border. Border is created somehow by iText. I initially thought that it was bug, but since iText 5.0.2 this problem remained so now I doubt that is bug (I am currently using 5.1.3).
UPDATE 2 I forgot to add this link: http://itext-general.2136553.n4.nabble.com/template/NamlServlet.jtp?macro=print_post&node=2157261 Here is presented VB script that works, but I cannot convert to Java code (it still draws black border), so can someone help me at least with this to convert good?