Contents   Index   Previous   Next



Creating the layout

 

The first step is to assign the XML file EXAMPLE.xml mentioned above as the data source. Do this with the command File Get grouping structure (XML/DTD) or the icon in the icon bar. Choose the correct XML file and confirm the popup dialog.

 

Now you see the XML structure in the XML window.

 

 

Group the page to the node ProductGroup. Use the context menu or the function Grouping from the inspector window.

 

 

The next step is placing the frames on the sheet. To create the PDF page we showed you earlier, you need some text frames in the header: one for the headline "Spring collection", one for the field label "Product group ID", one containing XML data for the product group name and one containing XML data for the product group ID (the last two frames can be dragged from the XML tree). Also you need two static image frames (one in the header containing the logo, one in the footer area containing the flower image) and a table grouped to the node Product with one row, seven columns and a header. We need a bigger header than the default header so pull the blue line on top a little bit down, right above the table. Make sure the text frames are all entirely placed inside the header.

 

 

Place the XML frames into the table by drag and drop of nodes from the XML tree:

 

Put the following nodes into the first six table cells from left to right:

 

Product/ProductNumber

 

Product/ProductName

 

Product/ProductPrice

 

Product/Properties/Height

 

Product/Properties/Weight

 

Product/Properties/Color.

 

Fill the last table cell on the right with an XML image frame. Double click the frame and select the XML node Properties/img. Enter the Image base path where the images are stored into the corresponding field in the inspector window, in our example it is ../input/Tutorial/ 10_Example_Manual/img. The field Image Path in the inspector window now shows the name of the node containing the image information and the path to it, in our example: Properties/img, as the image field is in the table already grouped to the node Product. As the images we are going to display in that frame already have the correct size and we don’t want to resize the table row, uncheck the check box Fit to Frame. This way the images are automatically displayed in their original size.

Now enter the headline "Spring Collection" into the big text frame in the header and the label "Product group ID" into the little frame next to the text frame with the ProductGroupID data. You can add some styling in size, text color or background color to the texts. Also select the image "GenericLogo.jpg" from the directory 10_Example_manual/img for the image frame in the header (this time you should the check boxes Fit in Frame, as this image can only displayed in the size of the frame for space reasons, and Keep aspect ratio to avoid distortions):