Open GoogleCodeExporter opened 9 years ago
Hi there, just thought I Would share this with you. This is what I do. :
float w = "my width" ; < enter your figures here.
float h = "my height";
Float scale = 1f;
float sh = page.getHeight();
float sw = page.getWidth();
if (w > 0)
scale = w / sw;
else
scale = h / sh;
int rotate = Page.PAGE_ROTATE_AUTO;
ImageType color = ImageType.IMAGE_TYPE_ARGB;
PageRenderer render = new PageRenderer(page, scale, rotate, color);
render.setAntiAliasLevel(antiAliasLevel);
render.setZoom(scale);
render.render(true);
img = render.getImage();
render.dispose();
ps. zoom is in there twice cos on version 5 zoom does not work on PageRenderer
line at the moment.
Anyway hope this helps
Original comment by terry.cl...@gmail.com
on 7 Apr 2014 at 10:29
Yup...that's the way to do it! Also the PageRendereer issue should be fixed
now. I updated the Jar files.
Thanks!
Original comment by pedro.ri...@gmail.com
on 9 Apr 2014 at 1:53
Original issue reported on code.google.com by
giuseppe...@gmail.com
on 18 Mar 2014 at 4:17