在iText 7中是否有相当于iText 5的PdfSmartCopy类?如果没有,我如何在iText 7中实现相同的功能?
您可以将a的SmartMode属性设置PdfWriter为true:
/**
* Sets the smart mode.
* <p/>
* In smart mode when resources (such as fonts, images,...) are
* encountered, a reference to these resources is saved
* in a cache, so that they can be reused.
* This requires more memory, but reduces the file size
* of the resulting PDF document.
*/
public PdfWriter setSmartMode(boolean smartMode)
Run Code Online (Sandbox Code Playgroud)
使用这样的a PdfWriter来复制页面相当于使用a PdfSmartCopy.
| 归档时间: |
|
| 查看次数: |
711 次 |
| 最近记录: |