Using getIcon/buttonSetIcon should work, but you have to make sure the button is set up so that it's layout is not "Label Only".
Also, it's better to store the icons in hidden buttons and retrieve them using buttonGetIcon due to a bug that causes the document-level icons to get wiped out when performing a file Save As operation.
Hi George, I've gotten named APs to work, and I expect hidden buttons will follow. Thank you very much!
Quick follow-up - I will have many documents embedded within the same pdf file, and some of these documents will contain identical popups. However, I don't want to store identical icons in each document on account of file size.
Instead, I'd like to store one instance of each icon for all documents in the file.
Can I store all of the icons in a single document, and then access them by calling <DocName>.getField().getIcon() from any document in the file?
Thank you again,
It's possible to do that, but the document containing the icons has to be opened and its "disclosed" property need to be set to true. Check out the app.openDoc method documentation for more info.