pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clifford Dann <cliff...@paprika-software.com>
Subject Image problems with PNG
Date Tue, 27 Aug 2013 13:06:39 GMT
When adding a image to a PDF document using 
xobject, float x, float y, float width, float height), the image has a 
spotty black line at the top of the image, and this goes over several 
lines of the image, and then 2 thirds of a line.

I am using org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap to 
create the PDXObject.

if I do java.awt.image.BufferedImage bi = new 
java.awt.image.BufferedImage(100, 100, 
and place the image in the PDF using PDPixelMap, I do not get a solid 
black box, I get the same effect, as putting in a normal PNG at the top 
, and then the rest of the image is solid black.
using .drawXObject(xobject, 0, 0, 100, 100)

The version of PDFBox I am using is 1.8.2, but this happens with earlier 
and the version of Java is 1.7.0_17-b02 64-Bit, I am running PDFBox in a 
servelet using tomcat, but this should not have an effect.

I am adding to a existing PDF (using it as a template), and also adding 
lots of text lines ect, it also happens if I do not start from a 
template PDF.

View raw message