XFA Specification
Chapter 2, Template Features for Designing Static Forms
Content Types
42
Example 2.5
Embedded background image
<draw name="StaticImage1" y="3.3969mm" x="0mm" w="63.6586mm" h="17.5246mm">
<value>
<image contentType="image/tif">
SUkqAAgAAAAVAP4ABAABAAAAAAAAAAABAwABAAAA0wIAAAEBAwABAAAA6QAAAAIBAwADAAAACgEA
AAMBAwABAAAABQAAAAYBAwABAAAAAgAAABEBBAACAAAAEAEAABUBAwABAAAAAwAAABYBAwABAAAA
</image>
</value>
</draw>
Example 2.6
Referenced background image
<draw name="StaticImage2" w="79.12mm" h="28.84mm">
<value>
<image
href="http://www.example.org/pathname/Picture.jpg"
contentType="image/jpg"/>
</value>
</draw>
Images Provided as Data
Images may also be provided as data bound to a field element. The template may provide an image as a
default value for the field (Example
2.7)
and an image may be supplied by a user (Example
2.7)
or by an
external source (Example
2.8),
such as a database server.
As with images in
draw
elements, a field image is either embedded in the image element as pcdata or is
referenced with a URI.
The user interface provides an imageEdit widget that allows images to be supplied as URIs. The imageEdit
properties specify whether the image is embedded in the image element or represented as a reference.
Example 2.7
Field with an editable image value
<field name="ImageField1" w="80.44mm" h="28.84mm">
<ui>
<imageEdit data="embed"/>
</ui>
<value>
<image contentType="image/jpg">
/9j/4AAQSkZJRgABAgEAYABgAAD/7RBKUGhvdG9zaG9wIDMuMAA4 …
</image>
</value>
</field>
Example 2.8
Field with an image value supplied by an external source
<field name="signature"
y="58.42mm" x="149.86mm" w="44.45mm" h="12.7mm" anchorType="topCenter">
<value>
<image aspect="actual"/>
</value>
<bind match="global"/>
</field>
Home Index Bookmark Pages
Pages: Home Index All Pages