【问题标题】:The method createGraphics(float, float) from the type PdfContentByte is deprecated不推荐使用 PdfContentByte 类型的方法 createGraphics(float, float)
【发布时间】:2016-03-21 05:00:39
【问题描述】:

不推荐使用 PdfContentByte 类型的 createGraphics(float, float) 方法,这是替代方法

【问题讨论】:

    标签: java pdf-generation itext


    【解决方案1】:

    检查iText的JavaDoc

    获取要在其上写入的 Graphics2D。图形被翻译成PDF 命令作为形状。不会出现 PDF 字体。

    已弃用:使用 PdfGraphics2D 中的构造函数

    【讨论】:

    • 谢谢,我添加了 Graphics2D g2 = new PdfGraphics2D(contentByte, 500, 500);这条线对我来说很好用
    猜你喜欢
    • 1970-01-01
    • 2015-07-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多