5 Replies Latest reply on Dec 3, 2011 9:33 AM by John Hawkinson

    IDML help

    Dan Macy Level 1

      Is there any Adobe forum where I can go for help with IDML? I'm using CS5 and need to write an application to generate IDML files. I'm trying to understand geometry in IDML (section 10.3.3 in the IDML File Format Spec) and I can't make any sense out of the simplest example I've created in InDesign. Help! Thanks!

        • 1. Re: IDML help
          John Hawkinson Level 5

          Well...no not really. You can ask here, the scripting forum, or I guess the SDK forum. You'll probably get the same answer though.

           

          But what's the question? Show us your example.

           

          §10.3.3 is a bit complex, but the example on p.102 ("Geometry Example") seems simple enough.

          • 2. Re: IDML help
            Dan Macy Level 1

            Thanks very much for your reply. My sample problem is quite simple: One 8.5" x 11" page with two rectangles on it. Both are 1" wide and 1" high. One is X=1" and Y=1" (upper left corner of rectangle for all coordinates). The other is X=0.0" and Y=5.5".

             

            I am generating the IDML file from a program I wrote. When I open the IDML file in ID, both rectangles are 1.0139" wide and 1.0139" high. The first rectangle is X=0.9931" and Y=0.9931". The other is X=-0.0069" and Y=5.4931". In seems like there's some kind of setting that I'm not aware of that is doing a very small amount of scaling on all the coordinates of the path points.

             

            I've created the same file in ID and exported it. It uses an offset coordinate system for each of the rectangles that I can't figure out how it's calculated, but at least I can follow the path point coordinate values and see that they match what I'm expecting.

             

            I'll copy the contents of the one spread XML file in the IDML file to the bottom of this message. I can send the whole IDML file if you wish.

             

            Thanks again for your help!

             

            Dan

             

            <?xml version="1.0" encoding="utf-8" standalone="yes"?>

            <idPkg:Spread xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="7.0">

              <Spread Self="hp11" PageTransitionType="None" PageTransitionDirection="NotApplicable" PageTransitionDuration="Medium" FlattenerOverride="Default" ShowMasterItems="true" PageCount="1" BindingLocation="0" AllowPageShuffle="false" ItemTransform="1 0 0 1 0 0">

                <FlattenerPreference LineArtAndTextResolution="300" GradientAndMeshResolution="150" ClipComplexRegions="false" ConvertAllStrokesToOutlines="false" ConvertAllTextToOutlines="false">

                  <Properties>

                    <RasterVectorBalance type="double">50</RasterVectorBalance>

                  </Properties>

                </FlattenerPreference>

                <Page Self="hp10" Name="1" AppliedTrapPreset="TrapPreset/$ID/kDefaultTrapStyleName" AppliedMaster="hp06" MasterPageTransform="1 0 0 1 0 0" OverrideList="" TabOrder="" GridStartingPoint="TopOutside" UseMasterGrid="true" GeometricBounds="0 0 792 612" ItemTransform="1 0 0 1 0 -396">

                  <Properties>

                    <Descriptor type="list">

                      <ListItem type="string" />

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

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

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

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

                      <ListItem type="string" />

                    </Descriptor>

                  </Properties>

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

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

                    <Properties>

                      <AppliedFont type="string">Times</AppliedFont>

                    </Properties>

                  </GridDataInformation>

                </Page>

                <Rectangle Self="hp18" AppliedObjectStyle="ObjectStyle/$ID/[Normal Graphics Frame]" ContentType="Unassigned" GradientFillAngle="0" GradientFillHiliteAngle="0" GradientFillHiliteLength="0" GradientFillLength="0" GradientFillStart="0 0" GradientStrokeAngle="0" GradientStrokeHiliteAngle="0" GradientStrokeHiliteLength="0" GradientStrokeLength="0" GradientStrokeStart="0 0" ItemLayer="ub1" ItemTransform="1 0 0 1 0 -396" LocalDisplaySetting="Default" Locked="false" LockState="None" Name="$ID/" StoryTitle="$ID/" StrokeColor="Color/Black" StrokeWeight="1" Visible="true">

                  <Properties>

                    <PathGeometry>

                      <GeometryPathType PathOpen="false">

                        <PathPointArray>

                          <PathPointType Anchor="72 72" LeftDirection="72 72" RightDirection="72 72" />

                          <PathPointType Anchor="72 144" LeftDirection="72 144" RightDirection="72 144" />

                          <PathPointType Anchor="144 144" LeftDirection="144 144" RightDirection="144 144" />

                          <PathPointType Anchor="144 72" LeftDirection="144 72" RightDirection="144 72" />

                        </PathPointArray>

                      </GeometryPathType>

                    </PathGeometry>

                  </Properties>

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

                    <Properties>

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

                    </Properties>

                  </TextWrapPreference>

                </Rectangle>

                <Rectangle Self="hp19" AppliedObjectStyle="ObjectStyle/$ID/[Normal Graphics Frame]" ContentType="Unassigned" GradientFillAngle="0" GradientFillHiliteAngle="0" GradientFillHiliteLength="0" GradientFillLength="0" GradientFillStart="0 0" GradientStrokeAngle="0" GradientStrokeHiliteAngle="0" GradientStrokeHiliteLength="0" GradientStrokeLength="0" GradientStrokeStart="0 0" ItemLayer="ub1" ItemTransform="1 0 0 1 0 -396" LocalDisplaySetting="Default" Locked="false" LockState="None" Name="$ID/" StoryTitle="$ID/" StrokeColor="Color/Black" StrokeWeight="1" Visible="true">

                  <Properties>

                    <PathGeometry>

                      <GeometryPathType PathOpen="false">

                        <PathPointArray>

                          <PathPointType Anchor="0 396" LeftDirection="0 396" RightDirection="0 396" />

                          <PathPointType Anchor="0 468" LeftDirection="0 468" RightDirection="0 468" />

                          <PathPointType Anchor="72 468" LeftDirection="72 468" RightDirection="72 468" />

                          <PathPointType Anchor="72 396" LeftDirection="72 396" RightDirection="72 396" />

                        </PathPointArray>

                      </GeometryPathType>

                    </PathGeometry>

                  </Properties>

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

                    <Properties>

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

                    </Properties>

                  </TextWrapPreference>

                </Rectangle>

              </Spread>

            </idPkg:Spread>

            • 3. Re: IDML help
              John Hawkinson Level 5

              I was able to replicate your problem by pasting your XML inside a snippet. It would have been easier if you had done so yourself, and then also used the Advanced Editor and >> Syntax Highlighting > XML so your XML is ungarbled.

               

              It's instructive to look at your rectangle in units of points. We then see that it is not only 1.0139", but more usefully 73pt instead of 72pt. This suggests a fencepost problem.

               

              Actually, it's failure to compensate for the stroke boundary, I believe. Indeed, if we set the stroke weight to 0pt, then you have a 72pt square rectangle. You can also set the StrokeAlignment to InsideAlignment. Or you can change your boundaries. I imagine one of those solves your problem, right?

              • 4. Re: IDML help
                Dan Macy Level 1

                Thanks for your help once again. I think the stroke alignment is the answer. I'm coming from a FrameMaker background, and the way it handles stroke alignment is slightly different than ID, so I need to adjust my thinking.

                 

                I have never pasted XML inside a snippet nor used the Advanced Editor. Can you tell me briefly how to do these two things? I think they would be useful tools to know for the future. Thanks!

                • 5. Re: IDML help
                  John Hawkinson Level 5

                  You're welcome! (You should mark the answer as Correct or Helpful.)

                   

                  The Advanced editor is just this button in the regular editor:

                  aa.png

                  And then once you're there, you click the >> button in the editor and can choose XML.

                   

                  Oh, that's not what you meant by inside a snippet. Err, select a square on your page and File > Export it to a Snippet, and open the Snippet in your preferred text editor. You'll see it is a standalone IDML variant (unzipped); that is IDMS. Anyhow, also, remember that in IDML, there is no need to specify most fields -- they have reasonable defaults. So you can get away with omitting quite a lot.

                  1 person found this helpful