Adobe 27510753 Scripting Guide - Page 155
DocumentBleedUniformSize, DocumentSlugUniformSize, DocumentPreferences, PasteboardPreferences
UPC - 718659445294
View all Adobe 27510753 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 155 highlights
Adobe InDesign CS2 Scripting Guide Working with Documents in VBScript 147 you might want to omit slug information for the final printing of a document. The following script sets up the bleed and slug for a new document: Rem BleedAndSlug.vbs Rem An InDesign CS2 VBScript Rem Create a new document. Set myInDesign = CreateObject("InDesign.Application.CS2") Set myDocument = myInDesign.Documents.Add Rem The bleed and slug properties belong to the documentPreferences object. With myDocument.DocumentPreferences Rem Bleed .DocumentBleedBottomOffset = "3p" .DocumentBleedTopOffset = "3p" .DocumentBleedInsideOrLeftOffset = "3p" .DocumentBleedOutsideOrRightOffset = "3p" Rem Slug .SlugBottomOffset = "18p" .SlugTopOffset = "3p" .SlugInsideOrLeftOffset = "3p" .SlugRightOrOutsideOffset = "3p" End With If all the bleed distances are equal, as in the preceding example, you can alternatively use the DocumentBleedUniformSize property: Rem UniformBleed.vbs Rem An InDesign CS2 VBScript Rem Create a new document. Set myInDesign = CreateObject("InDesign.Application.CS2") Set myDocument = myInDesign.Documents.Add Rem The bleed properties belong to the documentPreferences object. With myDocument.DocumentPreferences Rem Bleed .DocumentBleedTopOffset = "3p" .DocumentBleedUniformSize = True End With If all the slug distances are equal, you can instead use the DocumentSlugUniformSize property: Rem UniformSlug.vbs Rem An InDesign CS2 VBScript Rem Create a new document. Set myInDesign = CreateObject("InDesign.Application.CS2") Set myDocument = myInDesign.Documents.Add Rem The slug properties belong to the documentPreferences object. With myDocument.DocumentPreferences Rem Slug: .SlugTopOffset = "3p" .DocumentSlugUniformSize = True End With In addition to setting the bleed and slug widths and heights, you can control the color used to draw the guides defining the bleed and slug. This property is not in the DocumentPreferences object-instead, it's in the PasteboardPreferences object: Rem BleedSlugGuideColors.vbs Rem An InDesign CS2 VBScript Rem Set the colors used to display the bleed and slug guides. Set myInDesign = CreateObject("InDesign.Application.CS2") With myInDesign.ActiveDocument.PasteboardPreferences Rem Any of InDesign's guides can use the UIColors constants... .BleedGuideColor = idUIColors.idCuteTeal .SlugGuideColor = idUIColors.idCharcoal Rem ...or you can specify an array of RGB values (with values from 0 to 255) Rem .BleedGuideColor = Array(0, 198, 192) Rem .SlugGuideColor = Array(192, 192, 192) End With