Dynamic Insertion Tags

Syntax reference for inserting documents, HTML, images, hyperlinks, and bookmarks in Wordize LINQ templates.
What is this page about?

This page documents the dynamic insertion tags used to inject complex content into a report at runtime.

It includes tag syntax, supported value types, useful switches, and compact examples with expected output.

Use these tags when plain scalar output (<<[... ]>>) is not enough.

Insert a Document

Syntax:

<<doc [document_expression]>>

Common switches:

  • -sourceStyles
  • -sourceNumbering
  • -inline
  • -build

Examples:

<<doc [booking.TermsDocumentPath]>>
<<doc [booking.AppendixBase64] -sourceStyles>>
<<doc [booking.PartialTemplatePath] -build>>

document_expression can evaluate to:

  • byte[]
  • Stream
  • string (URI, file path, or base64-encoded document)

Expected behavior:

  • The doc tag is replaced by the loaded document content
  • If -build is set, the inserted document is treated as a template and built with the current scope

Insert HTML

Two supported forms:

<<[html_expression] -html>>
<<html [html_expression]>>

Optional switch:

<<html [html_expression] -sourceStyles>>

Example:

<<html [booking.NoticeHtml]>>

If booking.NoticeHtml is <p><strong>Gate changed:</strong> B12</p>, the rendered paragraph appears in the report where the tag was placed.

Insert an Image

The image tag must be inserted inside a shape, typically a textbox, because Wordize replaces the tag with the rendered image within that shape.

Syntax:

<<image [image_expression]>>

Sizing switches – use one sizing switch to control how the image is resized inside the shape:

  • -keepRatio keeps the original aspect ratio while fitting the image inside the textbox bounds
  • -fitHeight keeps the textbox width and adjusts the height to match the image ratio
  • -fitWidth keeps the textbox height and adjusts the width to match the image ratio
  • -fitSize resizes the textbox to the exact image size
  • -fitSizeLim resizes the textbox to the image size, but never enlarges the textbox beyond its original dimensions
Important to note:
  • By default, Wordize stretches the image to fill the textbox without preserving the aspect ratio
  • -fitSizeLim behaves like -fitSize when the image is smaller than the textbox and like -fitHeight or -fitWidth when the image is larger
  • Use only one sizing switch per image tag

Examples:

<<image [traveler.PhotoPath] -keepRatio>>
<<image [traveler.QrCodeBytes] -fitSize>>

image_expression can evaluate to:

  • byte[]
  • Stream
  • Image
  • string (URI, file path, or base64-encoded image)

Expected behavior:

  • The tag is removed and the image is inserted into the containing shape

Syntax:

<<link [uri_or_bookmark_expression] [display_text_expression]>>

Examples:

<<link [booking.ManageUrl] ["Manage booking"]>>
<<link ["SupportSection"] ["Jump to support details"]>>

Expected output:

  • A clickable hyperlink replaces the tag
  • If display text is omitted or empty, the target value is used as display text

Insert a Bookmark

Syntax:

<<bookmark [bookmark_expression]>>
bookmarked_content
<</bookmark>>

Example:

<<bookmark ["SupportSection"]>>
Support details for this itinerary
<</bookmark>>

Expected output:

  • Bookmark start/end markers are created around the enclosed content
  • The opening and closing bookmark tags are removed
Important to note:
Some tags cannot be used in every document context. If a tag is ignored or causes a template error in a specific layout area, move it to a standard text run/paragraph and rebuild.