iText-使用PdfCleanUpProcessor后输出文件字体看起来模糊 [英] iText - Output file font looks blurry after using PdfCleanUpProcessor

查看:132
本文介绍了iText-使用PdfCleanUpProcessor后输出文件字体看起来模糊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用iText 5.5.8完全按照

I'm using iText 5.5.8 to remove some text in a rectangle in my PDF, exactly following this example. E.g. the code snippet like below:

final Rectangle rect = new Rectangle(0, 12, 300, 21);
final PdfReader reader = new PdfReader(inputPDF);
final PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outputPDF));
for (int i=1;i<=reader.getNumberOfPages();i++) {        
    cleanUpLocations.add(new PdfCleanUpLocation(i, rect, BaseColor.WHITE));
}

PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, stamper);   
cleaner.cleanUp();

stamper.close();
reader.close();

但是,在输出文件中,所有这些粗体文本的权重都变得更大,并且看起来模糊.同时,所有普通文本仍与原始文本相同.

However, in the output file, all those bold texts weight becomes heavier, and looks blurry. Meanwhile, all normal texts are still same as original.

有人知道如何解决此问题吗?

Does anyone know how to fix this problem?

推荐答案

最后,我已通过将iText降级回到版本5.5.4解决了该问题!

Finally, I have resolved this problem by downgrading the iText back to version 5.5.4!

这篇关于iText-使用PdfCleanUpProcessor后输出文件字体看起来模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆