Skip to content

Instantly share code, notes, and snippets.

@mipmip
Created July 11, 2013 12:34
Show Gist options
  • Select an option

  • Save mipmip/5975066 to your computer and use it in GitHub Desktop.

Select an option

Save mipmip/5975066 to your computer and use it in GitHub Desktop.
make indesign document
-- 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