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.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Yury Shulhat
created issue -
Yury Shulhat
made changes -
Field | Original Value | New Value |
---|---|---|
Attachment | example.pdf [ 17494 ] | |
Attachment | example.png [ 17495 ] |
Patrick Corless
made changes -
Fix Version/s | 5.2 [ 10970 ] |
Patrick Corless
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Won't Fix [ 2 ] |
Patrick Corless
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |