6 Replies Latest reply: Feb 15, 2012 11:20 PM by Alfred Angkasa RSS

    IDML spreads

    Alfred Angkasa

      Hello. I'm Alfred. I have some question to ask.

      If I have 1 spreads that spare page 2 and page 3.

       

      In page 2, i have one picture and one text. Let's say that my picture name is ball1.jpg and my text is "Hello page 2".

      In page 3, i also have one picture and one text. At this page, my picture name is ball2.jpg and the is "Hello page 3".

       

      Each page has their own name such as <page self="u103" ... > or <page self="u104" ... >.

      Below the page, there are a two rectangle tag (for ball1.jpg and ball2.jpg) and two textframe tag.

       

      And the question is, how do i know that ball1.jpg and "Hello page 2" are refer to page with name "u103" and ball2.jpg and "Hello page 3" are refer to page with name "u104"?

      Is there any ID that show up or what?? thanks before!

        • 1. Re: IDML spreads
          Harbs. MVP

          Pages in InDesign are not much more than rectangles which define areas on a spread.

           

          The true parent of objects are the spread and not the page. To determine which page an object is located on, you need to compare the object coordinates with the page coordinates.

           

          In the scripting DOM there's a parentPage property which does that work for you. If you write the page into a custom label, you can access that data in the IDML...

           

          Harbs

          • 2. Re: IDML spreads
            Alfred Angkasa Community Member

            Thanks for the replay Harbs.

            But which one is the object coordinates and which one is the page coordinates?? Can you give me some example? Thanks. 

             

            DOM stands for? Sorry. I'm new with InDesign..

            • 3. Re: IDML spreads
              Harbs. MVP

              I don't understand your question. Page coordinates are page coordinates and object coordinates are object coordinates.

               

              DOM = Document Object Model.

               

              Harbs

              • 4. Re: IDML spreads
                Alfred Angkasa Community Member

                I mean which tag are represanted the coordinates??

                 

                lets say if i have the tag XML like this.

                 

                <Page Self="uba" GeometricBounds="0 0 841.889763778 595.275590551" ItemTransform="1 0 0 1 0 -420.944881889" Name="1" AppliedTrapPreset="TrapPreset/$ID/kDefaultTrapStyleName" OverrideList="" AppliedMaster="ubc" MasterPageTransform="1 0 0 1 0 0" TabOrder="" GridStartingPoint="TopOutside" UseMasterGrid="true">

                                              <Properties>

                                                        <Descriptor type="list">

                                                                  <ListItem type="string"></ListItem>

                                                                  <ListItem type="enumeration">Arabic</ListItem>

                                                                  <ListItem type="boolean">true</ListItem>

                                                                  <ListItem type="boolean">false</ListItem>

                                                                  <ListItem type="long">1</ListItem>

                                                                  <ListItem type="string"></ListItem>

                                                        </Descriptor>

                                                        <PageColor type="enumeration">UseMasterColor</PageColor>

                                              </Properties>

                                              <MarginPreference ColumnCount="1" ColumnGutter="12" Top="36" Bottom="36" Left="36" Right="36" ColumnDirection="Horizontal" ColumnsPositions="0 523.275590551"/>

                                              <GridDataInformation FontStyle="Regular" PointSize="12" CharacterAki="0" LineAki="9" HorizontalScale="100" VerticalScale="100" LineAlignment="LeftOrTopLineJustify" GridAlignment="AlignEmCenter" CharacterAlignment="AlignEmCenter">

                                                        <Properties>

                                                                  <AppliedFont type="string">Minion Pro</AppliedFont>

                                                        </Properties>

                                              </GridDataInformation>

                                    </Page>

                 

                <TextFrame Self="u12f" ParentStory="u11d" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" GradientFillStart="0 0" GradientFillLength="0" GradientFillAngle="0" GradientStrokeStart="0 0" GradientStrokeLength="0" GradientStrokeAngle="0" ItemLayer="ub2" Locked="false" LocalDisplaySetting="Default" GradientFillHiliteLength="0" GradientFillHiliteAngle="0" GradientStrokeHiliteLength="0" GradientStrokeHiliteAngle="0" AppliedObjectStyle="ObjectStyle/$ID/[Normal Text Frame]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 -292.4015748031044 103.46456693104346">

                                              <Properties>

                                                        <PathGeometry>

                                                                  <GeometryPathType PathOpen="false">

                                                                            <PathPointArray>

                                                                                      <PathPointType Anchor="-244.76377952760436 -59.52755905397271" LeftDirection="-244.76377952760436 -59.52755905397271" RightDirection="-244.76377952760436 -59.52755905397271"/>

                                                                                      <PathPointType Anchor="-244.76377952760436 59.52755905397271" LeftDirection="-244.76377952760436 59.52755905397271" RightDirection="-244.76377952760436 59.52755905397271"/>

                                                                                      <PathPointType Anchor="244.76377952760436 59.52755905397271" LeftDirection="244.76377952760436 59.52755905397271" RightDirection="244.76377952760436 59.52755905397271"/>

                                                                                      <PathPointType Anchor="244.76377952760436 -59.52755905397271" LeftDirection="244.76377952760436 -59.52755905397271" RightDirection="244.76377952760436 -59.52755905397271"/>

                                                                            </PathPointArray>

                                                                  </GeometryPathType>

                                                        </PathGeometry>

                                              </Properties>

                                              <TextFramePreference TextColumnFixedWidth="489.5275590552087"/>

                                              <TextWrapPreference Inverse="false" ApplyToMasterPageOnly="false" TextWrapSide="BothSides" TextWrapMode="None">

                                                        <Properties>

                                                                  <TextWrapOffset Top="0" Left="0" Bottom="0" Right="0"/>

                                                        </Properties>

                                              </TextWrapPreference>

                                    </TextFrame>

                 

                 

                which one is call page coordinates and which one is call object coordinates?? is it a pathgeometry? or the ItemTransfrom? thanks.

                • 5. Re: IDML spreads
                  Harbs. MVP

                  You need to compute it from the GeometricBounds and the ItemTransform.

                   

                  You might need to brush up on Matrix mathematics to get it right...

                   

                  Harbs

                  • 6. Re: IDML spreads
                    Alfred Angkasa Community Member

                    so, at the tag pages there are GeometricBounds and ItemTransfrom. that is the page coordinates??

                     

                    how about page coordinates??

                     

                    btw, how can i know the page dimension? I mean, in 1 spread i have 1 pages. where can i found the page dimension?

                    if i have 2 pages, where can i found the dimension? how can i count it?? thanks.