Signature Images Not Embedding in DOCX Template

Problem: We're generating a bulk release receipt PDF in Appian using:

  • DOCX Template with bookmarks named signature and signature2
  • XML Data Model for text content (case numbers, items, etc.)
  • Images Input to embed signature PNG files

What we verified works:

  • Signature documents exist (IDs: 432896, 437642)
  • todocument(432896) successfully converts IDs to document objects
  • Signature files are valid PNGs

Current Images Input:

= a!localVariables(
  local!firstRelease: index(pv!release, 1, null),
  local!relinquisherSigId: index(
    local!firstRelease,
    "relinquisherSignatureId",
    null
  ),
  local!receiverSigId: index(
    local!firstRelease,
    "recieverSignatureId",
    null
  ),
  a!map(
    signature: todocument(local!relinquisherSigId),
    signature2: todocument(local!receiverSigId)
  )
)

What's failing:

  • Using «${signature}» in template → FreeMarker error: "signature has evaluated to null or missing"
  • Using just bookmark names → Shows as hyperlinks, not images
  • Using conditionals [#if signature??] → Shows "[No Signature Provided]"

Expected: Signature images embedded at bookmarks in final PDF

Questions:

  1. How do you properly map document objects from Images input to DOCX bookmarks?
  2. What's the correct syntax for embedding images in XDocReport templates?
  3. Are there known issues with signature field documents not embedding?

Template:

Receipt for Evidence Receive.docx

  Discussion posts and replies are publicly visible