deprecated_A3DPDFDocumentAddImageAsIcon

A3DStatus deprecated_A3DPDFDocumentAddImageAsIcon(A3DPDFDocument *pDoc, const A3DPDFImage *pImage, const A3DUTF8Char *pcIconName)

deprecated

A3DStatus deprecated_A3DPDFDocumentAddImageAsIcon(A3DPDFDocument* pDoc, const A3DPDFImage* pImage, const A3DUTF8Char* pcIconName)

Function to store an image in the document in a way it can be used as an icon for interactive widgets.

DeprecatedThis function is deprecated. Please use A3DPDFDocumentAddImageAsIcon2() instead. This will be removed in version 2026.1.0.

Stored in that way, the image can be dynamically retrieved by the Acrobat JavaScript document function ‘getIcon’. For example, if the function is called with A3DPDFDocumentAddImageAsIcon(pimage, “myicon”), then the following JavaScript code might be used on the document to dynamically set the icon on a button :
`` var but = this.getField(“buttonfieldtopopulate”); var icon = this.getIcon(“myicon”); but.buttonSetIcon(icon); ``

Parameters

pDoc: The Document object to work with.

pcIconName: The icon name that will be used to identify the image.

pImage: The image.

Returns

A3D_SUCCESS in case of success or an error code