• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

PlugIn ToolBar Icon Not Dsiplaying Correctly

New Here ,
May 14, 2021 May 14, 2021

Copy link to clipboard

Copied

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: Capture1.PNG 

 

After Clicking: Capture2.PNG

TOPICS
Acrobat SDK and JavaScript , Windows

Views

160

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2021 May 15, 2021

Copy link to clipboard

Copied

LATEST

This is poorly documented or poorly implemented, I am not sure which. Do you do anything with the PDF icon file after closing it? My experience is that Acrobat takes a lock to prevent the close, and continues to try to read it after you close it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines