Native XFA Image and Graphic Values

The event host creates native image, arc, line and rectangle value children and their supported edge, corner and fill property paths; a draw's effective value reaches the native PDF consumer

Creating a draw value

function updateGraphic(row, pngBase64) {
  const image = row.logo.value.image;
  image.contentType = "image/png";
  image.aspect = "fit";
  image.value = pngBase64;
  const line = row.rule.value.line;
  line.slope = "/";
  line.edge.thickness = "0.25pt";
  line.edge.color.value = "0,0,255";
}

Native value choices are mutually exclusive, and creation preserves the template and other repeated occurrences

Arc and line each permit one edge, rectangle permits four edges and four corners, and arc and rectangle permit one fill

Line, rectangle and arc default to hand=even; line defaults to a backslash slope, while arc defaults to circular=0, startAngle=0 and sweepAngle=360

Image defaults to aspect=fit and transferEncoding=base64, with empty contentType, href and name attributes

Image consumption

Embedded PNG and JPEG draw values retain their decoded source colors; PNG transparency is stored as a native PDF soft mask rather than composited into the source channels

Fit preserves the image ratio inside the nominal region, none fills the region independently in both dimensions, width and height preserve the ratio while matching the named dimension, and actual uses physical image dimensions

Images are centered in their nominal region and clipped to that region; scaling and clipping preserve the surrounding graphics state

Actual sizing reads PNG pHYs density and JFIF density in dots per inch or dots per centimeter; an image without a supported physical-density record uses 96 DPI

Replacing an existing template image body preserves its template attributes unless a native form attribute overrides them

The FPC consumer reads original PNG and JPEG channels directly, avoiding pixel loss through LCL bitmap assignment; repeated identical opaque images retain native resource reuse

Graphic consumption

Created rectangle, line and arc values produce native paths with their effective edge colors and widths, including widths below one point; line slope and arc angular extent reach the consumer

New repeated instances receive independent native graphic properties, and script or native attribute-budget failures restore exact native XDP bytes

Remaining refinements

Native exData XML operations import foreign content transactionally and consume persisted XHTML draws

External image resolution, additional physical metadata such as EXIF, imageEdit widget consumption, full fill and corner rendering, handedness, circular arc geometry and complete scalar validation remain separate implementation targets

Reference and related APIs

The property grammar and image modes follow XFA 3.3; see Scalar Value Properties, Draw and Caption Values and Interactive XFA Runtime