Skip to content

Instantly share code, notes, and snippets.

@fractaledmind
Created September 19, 2013 00:06
Show Gist options
  • Select an option

  • Save fractaledmind/6617502 to your computer and use it in GitHub Desktop.

Select an option

Save fractaledmind/6617502 to your computer and use it in GitHub Desktop.
-- 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