Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 5.1
-
Fix Version/s: 6.0
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:Windows 7 x64, Java 7u21
Description
I extract page images using this code:
for (int index = 0, size = doc.getNumberOfPages(); index < size; index++) {
for(float zoom: new float[]{1f, 1.5f, 2f}) {
IDocumentPage page = new DocumentPage();
BufferedImage image = (BufferedImage) doc.getPageImage(index,
GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, 0f, zoom);
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(image, "png", bos);
page.setNumber(index);
page.setZoom(zoom);
page.setByteData(bos.toByteArray());
} catch (IOException e) {
throw new IllegalArgumentException("Can't divided document to pictures", e);
}
saveImage(page);
}
}
After migrating to IcePDF 5.1.0 image quality became poorer. See attached example and source pdf. Changing properties described here http://www.icesoft.org/wiki/display/PDF/System+Properties doesn't help at all.
for (int index = 0, size = doc.getNumberOfPages(); index < size; index++) {
for(float zoom: new float[]{1f, 1.5f, 2f}) {
IDocumentPage page = new DocumentPage();
BufferedImage image = (BufferedImage) doc.getPageImage(index,
GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, 0f, zoom);
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(image, "png", bos);
page.setNumber(index);
page.setZoom(zoom);
page.setByteData(bos.toByteArray());
} catch (IOException e) {
throw new IllegalArgumentException("Can't divided document to pictures", e);
}
saveImage(page);
}
}
After migrating to IcePDF 5.1.0 image quality became poorer. See attached example and source pdf. Changing properties described here http://www.icesoft.org/wiki/display/PDF/System+Properties doesn't help at all.
Are you running ICEpdf with any system properties?