HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › HTML/CSS rendering issues › PDF output does not render images correctly › Re: Re: PDF output does not render images correctly
April 26, 2011 at 11:49
#28495
You cannot increase size of pixels. You may increase image size in pixels.
For example:
width *= 5; height *= 5; BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); img.getRaster().setPixels(0, 0, width, height, pixels);
But, of course, pixels array must have a corresponding image data, match the new dimensions.
Also, if transparency is not absolutely necessary, I would recommend to use BufferedImage.TYPE_INT_RGB, or even BufferedImage.TYPE_BYTE_INDEXED to reduce resulting PDF document size.
