I have a script that prompts the user for a code, opens a doc matching that code from a folder of templates, duplicates those contents on the currently already open document (created by another process), then closes the template doc.
It's all working nicely, though the .duplicate() part always places the contents on the template document on the Left, and Vertically Centered.
Is there anyway to make it Top-Left ?
The blank document templates are being pasted on could vary though, so i guess it would involve getting the dimensions of the blank doc and using them in someway?
I see you can specifiy coordinates but 0,0 its always Left, and Vertically Centered, and any other hard-coded numbers might not work for different size docs
Hope that makes sense!
Check if your script is setting doc.viewPreferences.rulerOrigin
doc.zeroPoint depends on above set.
hmm, how would that relate to "duplicate(doc2.pages[i],[0, 0]);"?
would the 0,0 become top-left if i specifiy this rulerOrigin somewhere earlier in the script then?