I'm looking for a way to set the normal appearance of a button field in a PDF file to an image file, but am not finding any information about this process.
The closest I could find was the opposite, ie how to extract an icon from a button field to a stand-alone image file, here: How can i extract image from button icon in PDF using Apache PDFBox?
I would prefer to use PDFBox for this task.
Any help is greatly appreciated.
You can create a button with an image appearance using PDFBox like this:
(CreateImageButton.java test
testCreateSimpleImageButton
)As you did not mention any version requirements, I assumed you meant a current PDFBox 2.0.x.