Adobe InDesign Scripting

Automated publishing with XML, IDML, and scripting. The flexible XML options, new InDesign Markup Language (IDML), and rich scripting support in Adobe InDesign CS4 and Adobe InDesign CS4 Server software allow you to create powerful automated workflows for publishing content across various systems and output media. This area provides in-depth information about the XML, IDML, and scripting support in InDesign to help you create a strong foundation for custom solutions that meet your unique publishing requirements. 


Keywords Adobe, InDesign, Scripting, 1, Calculating, Geometric, Bounds

1_Calculating Geometric Bounds

   Adobe InDesign Scripting Forum Index -> Adobe InDesign Scripting
 
AuthorMessage
Karthik_ind
Guest





PostPosted: Tue Sep 05, 2006 11:01 am    Post subject: 1_Calculating Geometric Bounds



Hi All,

I want to draw a textframe in page number 3 with the following VB script.

Set myind = CreateObject("InDesign.Application.CS2")
Set mydoc = myind.ActiveDocument
Set mypage = mydoc.Pages(3)
Set mytf = mypage.TextFrames.Add
mytf.Contents = "Hello"
GB = mytf.GeometricBounds
GB(0) = 10
GB(1) = 10
GB(2) = 20
GB(3) = 20
mytf.GeometricBounds = GB

After running this script the textframe is drawn in page number 2.

This is caused due to geometricbounds calculation?

Does Indesign calculate the geometricbounds for each spread left side?

What can I do for calculate the geometricbounds for each page left side?

If anybody have an idea please help me.

Karthik
Back to top
Peter_Kahrel (A_T) adobeforums.com
Guest





PostPosted: Tue Sep 05, 2006 11:08 am    Post subject: Re: 1_Calculating Geometric Bounds



This depends on how the rulers origin is set in the document: per page or spread (or on the spine). You probably have set per spread, so GB(1) = 10 sets the left edge of the frame at 10 units of the spread. You want to set the ruler origin to page.

Peter
Back to top
Karthik_ind
Guest





PostPosted: Tue Sep 05, 2006 11:25 am    Post subject: Re: 1_Calculating Geometric Bounds



Thanks Peter

Its works fine.

Karthik
Back to top
SuperMacGuy (A_T) adobeforums.com
Guest





PostPosted: Tue Sep 05, 2006 12:49 pm    Post subject: Re: 1_Calculating Geometric Bounds

adding "1_" to the beginning of your post will not bump it to the top, just fyi, if that was your goal
Back to top
Karthik_ind (A_T) adobeforums.com
Guest





PostPosted: Tue Sep 05, 2006 2:35 pm    Post subject: Re: 1_Calculating Geometric Bounds

Hai,

I don't know about that because my preferences in this page setting like that.

Karthik
Back to top
   Adobe InDesign Scripting Forum Index -> Adobe InDesign ScriptingAll times are GMT
Page 1 of 1

Related Topics