CARVIEW |
Select Language
HTTP/2 200
date: Sat, 19 Jul 2025 03:25:00 GMT
server: Apache/2.4.41 (Ubuntu)
vary: Cookie,User-Agent,Accept-Encoding
set-cookie: MOIN_SESSION_443_ROOT_moin=3a276d05fa2e4b27ec2d7599aaed0efa08f7dd40; Expires=Sat, 19-Jul-2025 04:25:00 GMT; Max-Age=3600; Secure; Path=/
content-encoding: gzip
content-type: text/html; charset=utf-8
x-clacks-overhead: GNU Terry Pratchett
strict-transport-security: max-age=315360000; includeSubDomains; preload
MacPython/InDesign - Python Wiki
Only some snippets from a simple InDesign automator...
inD = app('Adobe InDesign CS2') inD.script_preferences.user_interaction_level = k.never_interact finder = app('Finder') doc = inD.open(mactypes.Alias(u'/Users/user/Documents/test.indd')) if doc.pages[page].side() == k.right_hand: print "page %d is on the righthand side" % page
How to place a text file and delete the first 2 lines:
story = doc.place(macpath, on=doc.pages[page], showing_options=False) story.lines[1:2].delete()
Fix the size of the new text frame:
rect = [76, 12, 284, 65] # left, top, height, width in default unit (e.g. mm) frame = story.text_frames[1].get() frame.geometric_bounds.set(rect) if frame.overflows(): # too much text -> increase size
MacPython/InDesign (last edited 2008-11-15 14:00:31 by localhost)
Unable to edit the page? See the FrontPage for instructions.