Skip to content

PlaceObject

Outputs a rectangular object (image, table, box or textblock).

Child elements

Box, Circle, HTML, Image, Table, TextBlock, Value

Parent elements

AtPageCreation, AtPageShipout, Case, Contents, ForAll, Function, Loop, Otherwise, Record, Template, Until, While

Attributes

allocate (optional)
Determines if the area of the object is marked as “allocated”. With allocate="no", the cursor position is not changed. In a Slate, an object with allocate="no" takes no room: it is drawn where it is placed, at lengths or in the grid, negative offsets included, but it does not make the slate larger or move the objects placed after it. Without it, an object placed at lengths in a slate takes room there like one placed in the grid.
yes
Occupy space in the grid (default for grid positioning).
no
Don’t allocate space in the grid. An object placed at lengths on a page never allocates grid cells.
area (text, optional)
Name of the positioning area where the object should be placed.
background (yes or no, optional)
Fill the background of the object with a color, given by background-color.
background-color (text, optional)
Color of the background if “background” is set to “yes”.
column (number or length, optional)
If contents is a number: the grid cell from the left margin of the area. If it is a length: the absolute position from the left paper margin. If this attribute is omitted, the system tries to place the object by itself.
frame (yes or no, optional)
Draw a frame around the object.
halign (optional)
When an object is placed on the grid and it’s width is not a multiple of grid width, there is a space left on the page between the object an the next grid cell. With this attribute you can instruct the software where to place the gap.
left
The object is aligned at the left.
right
The object is aligned to the right.
hreference (optional)
Determines the placement of the object relative to the given column. If ’left’ (which is the default), the given column is the left border of the object. If ‘right’, the column determines the right edge of the object.
left
The object is placed in given column.
center
The given column determines the horizontal center of the object.
right
The given columns determines the right edge of the border.
id (text, optional)
An identifier for this placement. It is attached to the placed object and written to the XML dump (--dumpoutput) as attr-id, so external tools can map the output boxes back to the layout element that produced them. It is not a CSS id: it cannot be matched in stylesheets and does not create a link target.
layer (optional)
Whether the object is drawn over or under the other objects. layer="behind" is meant for decoration such as panels, tints and rules, not for content: an object placed behind moves earlier in the content stream, so in a tagged PDF it is also read before the text above it.
front
Over everything placed before it (default).
behind
On a page, under everything placed on it since its AtPageCreation ran, and over what that drew. In a Slate, under the slate’s other objects.
row (number or length, optional)
The row where the object is placed. If none given, the publisher tries to find a row by itself. You can give a number (in grid cells) or an absolute value (from top left).
slate (text, optional)
The name of the slate that gets output. When given, PlaceObject should not contain any objects.
vreference (optional)
Determines the placement of the object relative to the given row. If ’top’ (default), the row specifies the top edge. If ‘bottom’, the row specifies the bottom edge. If ‘middle’, the row specifies the vertical center.
top
The given row determines the top edge of the object (default).
middle
The given row determines the vertical center of the object.
bottom
The given row determines the bottom edge of the object.

Example

Positioning inside the grid:

<Record match="image">
  <PlaceObject column="12" frame="yes">
    <Image width="10" href="_samplea.pdf"/>
  </PlaceObject>
</Record>

Absolute positioning (from top left edge):

<Record match="image">
  <PlaceObject column="1cm" row="4cm" frame="yes">
    <Image width="10" href="_samplea.pdf"/>
  </PlaceObject>
</Record>

Info

The objects can be placed in a grid (when the value in the attributes row and column are numbers) or they can be placed with absolute positions where the origin is at the top and left border of the page.

See also