Extracting PDF pages as JPG comes with bright / contrast lost

Hi,


We are extracting PDF pages (which are result of a scanning process) as images with JPG format to use them as thumbnails and preview pictures. When doing so, we have identified a loss of quality in image bright / contrast, as the result is not as well defined as the input PDF.

We have tried to adjust resolution parameter but it doesn’t help, as the problem does not come with reslution but with image quality. As the contents we’re using are invoices and tickets this loss in contrast is a big concern for the end users, as it’s not so easy to read.

Here I paste the current code we are using for the image extraction:

PdfConverter converter = new PdfConverter();
converter.setResolution(SCAN_RESOLUTION);

//Bind the input PDF document to extractor
converter.bindPdf(strPdfDoc);

//Extract images from the input PDF document
converter.doConvert();

while (converter.hasNextImage()) {
[…]
converter.getNextImage(strOutputDir, ImageType.JPEG);
}

Any idea about how to improve the result, o if it’s just a bug or limitation?


Best Regards!

Hi Jose Luis,

First of all, please make sure that you’re using the latest version of the Aspose.Pdf.Kit for Java at your end.

Secondly, try to change the resolution of the output images using setResolution method.

Lastly, If above steps do not help at your end then please share the input PDF file with us, so we could investigate the issue at our end.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,