Add image to acrofield in iText?

后端 未结 3 1226
逝去的感伤
逝去的感伤 2020-12-09 12:40

I\'m trying to fill PDF using acrofields, I\'m able to add string data perfectly, but having issues in adding images to acrofields. This is my code for adding string data..

3条回答
  •  离开以前
    2020-12-09 12:59

    You can try add this with your code for adding Image

    PdfContentByte content = stamper.getOverContent(reader.getNumberOfPages());
    Image image = Image.getInstance(new URL("E:/signature/signature.png"));
    image.setAbsolutePosition(450,650);
    image.scaleAbsolute(200,200);
    content.addImage(image);
    reader.close();
    return output.toByteArray();
    

提交回复
热议问题