Landray RDM 101208 Convert Effect

pdf source code:
src.zip (4.4 KB)

origin pdf:
渤海湾港口集团《关于山东高速交通物流投资有限公司变更公司名称的请示》 (2) (1).pdf.zip (77.7 KB)

converted problem:
convert before1.jpg (214.3 KB)
convert after1.jpg (181.7 KB)

The font would be fuzzy.please have a check.

@hucq_landray_com_cn,

Thanks for sharing further details.

We have logged an investigation ticket as PDFJAVA-39301 in our issue tracking system. We will further look into details of it and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

@hucq_landray_com_cn

We have investigated the earlier logged ticket. The input PDF has no text inside, it has only small images (with resolution 300 PPI) embedded into it. So, any manipulations with the text or fonts do not bring results, but any manipulations with image quality (low resolution and compression) will affect the output result. If you need to get a good quality then do not use compression and low resolution for this document.

Document pdf = new Document(new FileInputStream("input.pdf"), true);
pdf.setOptimizeSize(true);
pdf.setBackground(java.awt.Color.WHITE);
pdf.setCenterWindow(true);
pdf.setFitWindow(true);
pdf.setDisplayDocTitle(false);
pdf.setIgnoreCorruptedObjects(true);
int resolution = 300; 
PngDevice png = new PngDevice(new Resolution(resolution));
PageCollection pageCollection = pdf.getPages();
int picPageCount = pageCollection.size();
for (int i = 1; i <= picPageCount; i++) {
    FileOutputStream ouputStream = new FileOutputStream("output_" + i + ".png");
    png.process(pageCollection.get_Item(i), ouputStream);
    ouputStream.close();
}