Hello Daniel, thank you for your reply.
As you pointed out, if the scripts are exactly the same, we can just put them in the JavaScript folder, but if they are based on the same script but only some parameters are changed according to the characteristics of the document, we have to rely on Document-Level JavaScript.
To use the above script as an example, this is a case where the cName and function name remain the same but only one zoom level value is changed. Of course, if the cName is unique for each document, the button will appear even in the PDF-XChange Editor. But then, as shown in the video below, the PDF-XChange Editor will also display the tool buttons of the inactive document, so if you have a lot of documents open, many tool buttons will overflow the screen.
Ultimately, the issue seems to come down to the following two points
- How to handle the case where the same cName is defined for toolbutton of Document-Level JavaScript in multiple documents?
- Whether Document-Level JavaScript toolbuttons in inactive documents should be displayed or not?
The handling of these points differs depending on the PDF software. For example, with Foxit Editor, if the same cName is defined for a toolbutton in Document-Level JavaScript in multiple documents, the behavior is the same as in Acrobat.
I am not sure if the behavior in Acrobat is compliant with PDF standards, but personally I would like PDF-XChange Editor to work the same way as Acrobat.
Please give my best regards to the developers.
Best regards,
rakunavi
You do not have the required permissions to view the files attached to this post.