Skip to main content

Introduction to the Import Tag

What Is the Import Tag?

The Import Tag lets you pull an external file into your template's output at generation time. The file can be an image, a text file, a PDF, an HTML page, or even another Fluent template (a subtemplate). This makes it easy to assemble complex documents from reusable building blocks — such as cover pages, letterheads, legal disclaimers, or shared headers — without duplicating content across templates.

How It Works

Unlike Out Tags (Text, Date, Number, Out) that retrieve data values directly from your data source, the Import Tag retrieves a file location — a file path or URL — from your data source and then imports the content at that location into your output.

caution

Your data source must contain the location (file path or URL) of the content to import, not the content itself. If the actual content (e.g., a Base64-encoded image or raw HTML) is stored directly in your data source, use an Out Tag instead.

What Can You Import?

The Import Tag supports several file types through its type property:

  • Images (BITMAP) — Import an image file (PNG, JPG, GIF, TIFF, BMP, etc.) by referencing its file path or URL in your data source.
  • PDFs (PDF) — Import a PDF file into your output. The imported pages are inserted as separate pages in your generated document. Only supported when outputting to PDF.
  • Subtemplates (TEMPLATE) — Import another Fluent template or an HTML file. This is powerful for assembling documents from modular, reusable template components.
  • Text (TXT) — Import a plain text file.
tip

If the type property is not set, the Import Tag will use the file's extension to determine how to handle it. Set the type explicitly when the file extension doesn't match the content or when you want to be certain of the behavior.

Import Tag vs. Out Tag

A common question is when to use an Import Tag versus an Out Tag for images and HTML. The rule is simple:

ScenarioUse
Data source contains a file path or URL pointing to the contentImport Tag
Data source contains the actual content (e.g., Base64 image data, raw HTML, blob)Out Tag

For example, if a database column stores C:\images\logo.png, use an Import Tag. If it stores the Base64-encoded image bytes, use an Out Tag.

How Do I Use an Import Tag?

  1. Connect to a data source — Your data source must contain the file path or URL of the content you want to import.
  2. Insert an Import Tag — Use the Fluent Designer ribbon to insert an Import Tag and write a query that returns the file location.
  3. Set the type (optional) — If needed, set the type property to tell the tag what kind of file to expect (BITMAP, PDF, TEMPLATE, or TXT).
  4. Configure properties — Use the Tag Editor to set optional properties like nickname, default (a fallback file if the query returns nothing), and display (to conditionally show or hide the import).
  5. Generate output — The imported content appears in your generated document at the location of the Import Tag.

Key Properties at a Glance

  • default — A fallback file path or URL to use if the query returns no results or errors.
  • display — Control whether the imported content is shown (always, notEmpty, notNull, or a Boolean expression).
  • type — Specify the file type to import (BITMAP, PDF, TEMPLATE, TXT).
  • break — Control page/section breaks around the imported content.
  • inline — Import content inline rather than as a separate section.

Learn More

For a complete breakdown of all properties and configuration options, see the Import Tag Reference.

For guidance on choosing between the Import Tag and Out Tag, see When Do I Use an Import Tag or an Out Tag?.