Understanding XFA Features – XFA Borders

This article is part of the ongoing XFA article index series, you can read more about XFA here. In this article we will be discussing how to draw XFA Borders and border based background colors in XFA XML template. More information can be found in Adobe XFA specification.

The <border> element consists of edge and corner; where the edge element describes the edges of the border and corner describes the intersection of the border.

if a widget (a field or draw element) is enclosed in single solid color border which has same thickness on all sides then you may find only one edge element is present in border node. For individual side editing there will be 4 edges presented in node.

Consider following Example

<edge stroke=”dashed”>
<color value=”255,0,255″/>
</edge>
<corner thickness=”0.1778mm” stroke=”dashed”>
<color value=”255,0,255″/>
</corner>
<edge/>
<edge/>
<edge>
<color value=”255,153,0″/>
</edge>

<fill>
<color value=”255,255,153″/>
</fill>

in above example the first edge will be drawn from top left hand corner to top right hand corner with color value 255,0,255 (rgb representation); and the line style will be dashed. the second edge will be drawn from top right hand corner to bottom right hand corner with solid line (if no strike is specified then system considers it as solid line, in the same way if no color is specified system draws the line in black). The XFA rendering machine draws the edges clockwise from top left hand corner.

xfaborder

The picture above illustrates that border thickness does not affect the text margin (Please note there is no padding features in XFA) coordination.

Fill attribute fills the enclosed region in any given color; Thickness defines the thickness of each border’s edges and corners.

<border break=”open”> 

The break attribute allows the widget border to display over multiple pages if its value is open.

In the next article in this ongoing series we will be investigating arcs and circles in XFA files.

This post is part of our “XFA Articles Index” in these articles, we aim to help you understand XFA.

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (TwitterFacebook and Google+) or the  Blog RSS.

 

The following two tabs change content below.

suda

Java EE developer at IDRSolutions
Suda is the Senior Java EE Developer at IDR Solutions, and specialises in XFA, Fonts, True-Type Fonts, application servers and conversions. He is a keen science-fiction fan in his spare time.

Related Posts:

suda

About suda

Suda is the Senior Java EE Developer at IDR Solutions, and specialises in XFA, Fonts, True-Type Fonts, application servers and conversions. He is a keen science-fiction fan in his spare time.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>