我需要從iText 5.5.11中的Jasper Reports創建的現有pdf中刪除一些內容,但是在運行PdfCleanUpProcessor之後,所有粗體文本都模糊不清。iText 5.5.11 - 在使用PdfCleanUpProcessor後,粗體文本看起來模糊
這是我使用的代碼:
PdfReader reader = new PdfReader("input.pdf");
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("output.pdf"));
List<PdfCleanUpLocation> cleanUpLocations = new ArrayList<PdfCleanUpLocation>();
cleanUpLocations.add(new PdfCleanUpLocation(1, new Rectangle(0f, 0f, 595f, 680f)));
PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, stamper);
cleaner.cleanUp();
stamper.close();
reader.close();
前面已經討論過here降級到iText的-5.5.4解決了這個問題,但對我來說iText的-5.5.11已經在使用其他原因和降級不是一種選擇。
是否有其他解決方案或解決方法?
請分享我們可以重現問題的PDF。 – mkl
@mkl使用「BEFORE」PDF重現問題 – Tieco
嗯,好的,對不起,我沒有正確閱讀您的問題文本,並預期只有圖像。我會看看。 – mkl