在PdfButtonFormField

时间:2018-01-25 09:08:57

标签: itext7

我使用以下代码:

    btnfield.setImage(imgFile.getAbsolutePath());

将图像添加到PdfButtonFormField对象。代码工作正常,直到我不得不在我的代码中添加以下行:

    PdfAcroForm.getAcroForm(this.pdf, true).put(PdfName.NeedAppearances, new PdfBoolean(true));

从那时起,图像不会出现 - 按钮的外观是带有“按钮”字样的灰色背景。 我想使用setAppearance()方法,但由于缺乏文档,我不知道如何做到这一点。任何帮助将不胜感激。

0 个答案:

没有答案
相关问题