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

Floating Tool Panel

Engaged ,
Feb 12, 2018 Feb 12, 2018

I was wondering if it is possible to have a Javascript tool panel that will "float" and allow the user to still navigate the pdf? I am wanting this panel to only display on page 2 of my document. I would also love if it could collapse or minimize out of the way. Not sure if it is possible.

Any help or guidance would be much appreciated!

Here is an example of one of the buttons I would like to have on the floating panel.

var ocgSchematicArray = this.getOCGs(this.pageNum);

var getButtonName = this.getField("GROUND WIRES");

for ( var i=0; i < ocgSchematicArray.length; i++) {

if ( ocgSchematicArray.name == "Black (Ground)")

if (ocgSchematicArray.state == true){

ocgSchematicArray.state = false;

getButtonName.buttonSetCaption("GROUND ON");

}

else if (ocgSchematicArray.state == false){

ocgSchematicArray.state = true;

getButtonName.buttonSetCaption("GROUND OFF");

}

}

Also I would like to note that this will be delivered to a user online so folder level will not be accessible to me for security reasons.

I am using Acrobat XI Pro and Javascript on a Windows computer.

Thank you in advance!

TOPICS
Acrobat SDK and JavaScript , Windows
385
Translate
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
Community Expert ,
Feb 12, 2018 Feb 12, 2018
LATEST

By floating you mean you want to user to be able to move it?  The answer is Yes, but only if the PDF is viewed in Acrobat/Reader. No other PDF viewer will do this, and it won't work at all on Mobil. 

the "app.addToolButton()" function will create a floating toolbar. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
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