简体   繁体   中英

How do I fill a certain field for image in pdf-file for the name's placeholder in Java?

With the help of the library - itext, I can fill in the specified field by name dynamically.

iText Add values to placeholders in PDF cover page dynamically

The question is: how to do it for a image?

If there are other ways with other libraries, I consider them.

Thank you for answer)

Add a button field to the PDF at the location and size you want it to occupy and name it something your code will recognize then just set the normal button appearance to the image you want to display.

See http://developers.itextpdf.com/examples/itext-action-second-edition/chapter-8#325-replaceicon.java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM