Defining an asymmetric bleed in InDesign CS5.5 using AppleScript

Using AppleScript to efficiently create your documents in Adobe InDesign is a no-brainer for most of us. One could create template files to achieve the same result, but, should the need to change said templates arise, then it’s dialog hell. If you, dear reader, memorized the location of every possible document setting in the program by heart, then this post is not for you. I prefer to be able to see all settings by looking at a text, I therefore use AppleScripts to create the documents I’m working on. I already told you, I want to concentrate on the creative side of my work.

I needed to create a document with an asymmetric bleed (nope, I won’t discuss if that makes sense). Doing so in InDesign is quite simple. Just tell the document preferences what you need:


set document bleed bottom offset to "3mm"
set document bleed top offset to "3mm"
set document bleed inside or left offset to "0mm"
set document bleed outside or right offset to "3mm"

When the document showed though, the bleed was the same for all four sides of the page. I checked the code, there should be no bleed on the left, but the program stubbornly refused to do what it was told. I then checked the dialog to set the bleed and lo and behold, setting the bleed manually didn’t work either. There is a default setting to make the bleed uniform, no matter what.

The innocent (and active) chain-symbol next to the values gave me a clue: InDesign does not switch to non-uniform just because I told it so, it needs more convincing. Some rummaging in the dictionary using AppleScript Editor later and I found a property called document bleed uniform size. I added the following line before setting the bleed:


set document bleed uniform size to false

And I got what I wanted. The working block of code needs to be in that order:


set document bleed uniform size to false
set document bleed bottom offset to "3mm"
set document bleed top offset to "3mm"
set document bleed inside or left offset to "0mm"
set document bleed outside or right offset to "3mm"

Lesson learned: Always be concise when telling InDesign what you expect.

Post a Comment

Your email is never published nor shared. Required fields are marked *, comments are moderated.

*
*