Contents   Index   Previous   Next



Dynamic images

 

Dynamic images cannot be placed to the sheet by dragging an XML node from the XML tree to the sheet. You have to click the icon and open a frame, like static images.

 

If you want to fill this image frame with dynamic contents now, there are two ways to do it and they depend on the data in your XML file. If you already have the image paths specified in the XML data source file, (e.g. <img>..\tutorial\Example_manual\image1.jpg</img>) you do not need to enter an Image base path here because these two specifications would clash. Please make sure that the path information is correct.

 

But if you have no path information in the XML file (e.g. <img>image1.jpg</img>), you need to specify the directory where the images can be found in the field Image base path. You can enter the image base path directly or use the search dialog.

 

The function Image/Image node is used to specify the XML node containing the image information. You can also enter this node with the complete depending on the grouping manually or, more conveniently with the dialog opening if you click the search button. A third way to select the correct XML node is to use the context menu and select the function Applicable XML nodes.

 

Again, Fit in frame means the image is resized to fit it into the given frame.

 

By Keep aspect ratio you determine whether the image proportions should be maintained, just like in static image frames.

 

Please note: If you place an image in a frame too small for its size, only a part of it will appear on your sheet and the image will not be displayed in the generated PDF at all. If you only select the option Keep aspect ratio, the image will also not appear at all in the PDF document. Only activating the option Fit in frame will produce a distorted image as a result. Choosing both options means the image will appear sized into the frame. So please make sure the frame you open for an image is of sufficient size. You can resize the frame later if you want to; if it is a static image you will see it in the frame on your sheet.

 

You need to specify if the element should be in an absolute place with the check box Absolute placement, meaning that all other dynamic data will flow over and through it if the positions match. If you unselect the check box, the element will appear on top or below other dynamic elements, e.g. tables.

 

If an element is placed absolute, you can specify exact coordinates for it in the section Bounds.

 

The Padding function controls the gap between the image and the edge of the frame. You can set all four sides independently.

 

As for static image frames, Orientation allows you to give the contents of the frame four orientations: 0 (regular orientation), 90 (turned 90 degrees counterclockwise), 180 (upside down) and 270 (turned 270 degrees counterclockwise /90 degrees clockwise).

 

Attention: The orientation is not visible on the working sheet but only after the processing of the layout.

 

A border around the image can be achieved with the function Border. As in Paddings, the borders for all sides can be set independently in size and color via the following dialog which opens if you click on the editing field next to Border:

 

 

The command Horizontal Alignment offers several commands: Left, Center, Right to align the image inside its frame. If the image frame is placed in a table, you are also offered the command Vertical alignment containing alignment to Top, Center, and Bottom. These commands will allow you to align the image inside a table cell.

We have processed an example with a very simple logo and we put a black border around it:

 

 

Most of the further commands in the inspector window match the text frame commands, which we have already described. The commands in the XSL-FO options are also explained in the chapter Text elements.