Skip to main content
Participant
May 14, 2021
Question

SDK Plugin Icon Not Displayed Correctly

  • May 14, 2021
  • 1 reply
  • 360 views

I have created an Acrobat DC PlugIn which creates a toolbar. The icon for the toolbar initially shows up correctly, but on subsequent mouse clicks of the icon, it turns black. I cannot find any significant documentation on the AVToolBarSetIcon function and am going by one or two samples I have seen. I am not sure what the two images in AVToolBarSetIcon should be. It doesn't seem to matter what the second one is though. The code is shown here:

 

ASPathName pn = ASFileSysCreatePathFromCString( ASGetDefaultFileSys(), settings.logoFilename );
PDDoc doc = PDDocOpen( pn, ASGetDefaultFileSys(), NULL, false );
AVIcon icon1 = AVIconCreateFromPDF( doc, 0, 24, 24 );
AVIcon icon2 = AVIconCreateFromPDF( doc, 1, 24, 24 );
AVToolBarSetIcon( mainToolbar, icon1, icon2 );
PDDocClose( doc );

 

Before Clicking:  

 

After Clicking: 

1 reply

Participating Frequently
July 19, 2025

Are u sir by any chance Mr.James?