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 use iText to split and merge PDF, I need your help to reduce (compress) the output PDF format programmatically. Please let me know the steps to achieve the same.
source share