Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 72601

Re: Inserting a new page using scripting in Adobe Pro DC

$
0
0

That tutorial was extremely helpful and I think I'm almost there. How do I reference the document object? I put the function in it's own .js file and added the Javascripts folder to the trusted folders part in the javascript preferences(not sure if that was actually necessary), now I can see in the console that it is reading the function from that file but I'm not sure how to reference the document object. I tried passing it in as:

trustedNewPage(document, pageNumber, pageRect)

 

then putting it in the function as:

trustedNewPage = app.trustedFunction(function (doc, pageNumber, pageRect) {

  app.beginPriv();

  doc.newPage(pageNumber, pageRect[2], pageRect[1]);

  app.endPriv();

})



I know this is probably elementary but I've never worked with this type of thing before. Thanks in advance for your help!


Viewing all articles
Browse latest Browse all 72601

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>