Reviewing the forums, I have notice threads discussing 「App Level Javascripts」 and how they need to be saved to either:
- 「file:\\C:\Program Files\Tracker Software\PDF Editor\」
- 「%appdata%\Tracker Software\PDFXEditor\3.0\」
- NotAllowedError: Security settings prevent access to this property or method.
- this.createTemplate()
- Paul - PDF-XChange wrote: ↑Thu May 26, 2022 9:20 pm Hi pigster,
this would be because we do not currently support the method createTemplate(). We agree we should, so it will be added. I have raised the associated Support Request and this item will be delivered at the Development Team Leader's discretion.
Currently I have no ETA for this, but am hopeful it will be in the next scheduled build in a few months time.
RT#6109: Feature request :: Editor :: add support for JS API createTemplate() is for internal use only, but it is your reference to send us in case you are looking for an update.
- this.newPage()
- Stefan - PDF-XChange wrote: ↑Mon Jan 23, 2023 10:15 am Hello nuflux,
Over the weekend I got some feedback from one of our devs.
They told me that they will investigate the situation, and it might be a bug on our end that the trustedFunction works with newDoc() but does not work with newPage(). As soon as I have more information I will post again here!
Kind regards,
Stefan
With all that as a backdrop:
. Are functions this.createTemplate() and this.newPage() still in limbo for App-Level JavaScript? If these functions still are in limbo, are there any workarounds?
Personally, I was able to find (1) workaround, and that is this.insertPages() is supported. I can either reference the current page of cPath:this.path or reference a blank-PDF to have the effect of this.newPage(). However, I would rather use this.newPage instead of forcing a work-around solution.
May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
Sources:- How do I add a custom tool to the toolbar, using JavaScript, in the Editor? https://www.pdf-xchange.com/knowledgeba ... the-Editor
- How to create custom buttons in Toolbar: viewtopic.php?t=40336
- Using Trusted Functions [url]https://www.pdfscripting.com/public/Using-Trusted-Functions.cfm[/url]
- EPIC User Created Custom Hatch Pattern Tool (with Trusted Functions, custom dialog box, custom user settings, custom icon, filestream, Global Variables) viewtopic.php?t=40329
- Acrobat JavaScript Scripting Reference
- Adobe Acrobat 7.0.5 [PDF]
- https://www.pdfill.com/download/AcroJS.pdf
- Adobe Acrobat 7.0 [PDF]
- https://experienceleaguecommunities.adobe.com/skucn57933/attachments/skucn57933/adobe-livecycle-community-qanda/101891/1/AcroJS.pdf
- ONLINE: JavaScript APIs:
- https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html
- Adobe Acrobat 7.0.5 [PDF]