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
You cannot increase size of pixels. You may increase image size in pixels.
For example:
[language=java:1tmqc50j]width *= 5;
height *= 5;
BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
img.getRaster().setPixels(0, 0, width, height, pixels);[/language:1tmqc50j]
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.