Created
July 11, 2013 12:34
-
-
Save mipmip/5975066 to your computer and use it in GitHub Desktop.
make indesign document
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- tell application "InDesignServer" | |
| tell application "Adobe InDesign CS3" | |
| set myDocument to make document | |
| tell myDocument | |
| tell page 1 | |
| set myTextFrame to make text frame | |
| set geometric bounds of myTextFrame to {"6p", "6p", "18p", "18p"} | |
| set contents of myTextFrame to "Hello World!" | |
| end tell | |
| end tell | |
| set myFilepath to my unix2MacPath("/Volumes/DupaData/Users/pimsnel/myTempFile.indd") | |
| export myDocument format PDF type to my unix2MacPath("/Volumes/DupaData/Users/pimsnel/myTempFile.pdf") | |
| set myDocument to save myDocument to myFilepath | |
| close myDocument | |
| end tell | |
| set myResult to myFilepath | |
| on unix2MacPath(pathin) | |
| set tmppath to pathin | |
| set returnValue to (POSIX file tmppath) as string | |
| return returnValue | |
| end unix2MacPath | |
| on mac2UnixPath(pathin) | |
| set tmppath to pathin | |
| set returnValue to POSIX path of tmppath | |
| return returnValue | |
| end mac2UnixPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment