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
<corner thickness=”0.1778mm” stroke=”dashed”>
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.
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.
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.
Latest posts by suda (see all)
- Lancsoz3 algorithm as a way to produce better image downscaling - January 5, 2016
- How to read Tiff images in Java - August 13, 2015
- How to generate smaller PNG files in Java - July 1, 2015
- PDF XFA – Sending data as an Email - February 24, 2015
- PDF Coons Shading – find color value of given point - January 27, 2015