java如何调整pdf字体大小,如何在Java中以编程方式减少PDF文件大小?

Document document = new Document(reader.getPageSizeWithRotation(1));

PdfCopy writer = new PdfCopy(document, new FileOutputStream(outFile));

document.open();

PdfImportedPage page = writer.getImportedPage(reader, ++i);

writer.setFullCompression();

writer.addPage(page);

document.close();

writer.close();

I am using iText to split and merger the PDF, I need your help to reduce (compress) the output PDF size programmatically. Please let me know the steps to achieve the same.

解决方案

With writer.setFullCompression() you already compressed file as much as possible. With iText you can't do anything more.

你可能感兴趣的:(java如何调整pdf字体大小)