Skip to content
Smart Templates Manual Website Manual for your AI

Barcode, QR code and GiroCode

In short

A code is an object like an image: a box in which Smart Templates draws a barcode, a QR code or a GiroCode (the EPC QR code for SEPA transfers) when the document is generated. The content is a variable, that is a field or a custom variable, a fixed text such as a web address, or a value with if-then; in the “Properties” window a variable appears as a blue placeholder. A double-click on the code asks for the content or opens what is stored; for the GiroCode it opens a window with all fields. The code is fitted print-sharp and never split. If it cannot be formed from the data of a document, it is not printed, its place stays empty, and the document reports it. Only a visible GiroCode that is invalid prevents the whole document. A hidden code is not checked; its values may then be empty.

What a code is

A code consists of a box and a content. The box has a width and a height and sits at a place on the sheet, in a group or in a table cell. The content is a text that a scanner or an app reads from the code: a document number, an item number, a link or the data of a transfer. The three buttons in the ribbon all create the same object; they differ in the type of code:

ButtonTypeWhat for
“Barcode” Barcode: Code 128, EAN-13, EAN-8, Code 39 or ITF (see The barcode types and their characters) Document numbers, item numbers, for example the EAN per line item on a delivery note.
“QR code” QR code (see The QR code) Links, texts and numbers that a phone reads.
“EPC QR code (GiroCode)” GiroCode (EPC QR code per EPC069-12, known in Germany as GiroCode; see The GiroCode) A transfer in euros: The customer’s banking app reads beneficiary, IBAN, amount and remittance text and fills in the transfer.
A group with a light blue background and a blue dashed edge. At the top left the bold heading “So bezahlen Sie”. Below it three codes side by side, each on a white area: on the left a square QR code with the caption “GiroCode: Überweisung in der Banking-App”, in the middle a somewhat smaller QR code with the caption “QR-Code: Rechnung online ansehen” and on the right a barcode with the plain text “RE-2026-1042” and the caption “Rechnungsnummer als Strichcode”.
A payment group on an invoice with all three codes. Name, IBAN and numbers are invented.
  1. 1A GiroCode of 32 × 32 mm. Beneficiary, IBAN, amount and remittance text come from fields.
  2. 2A QR code of 26 × 26 mm with a link that contains the document number.
  3. 3A barcode (Code 128) with the document number and the plain text below it.

You can use a code anywhere an image may stand: directly in the document, in a group, in the header and footer and in a table cell. The names “GiroCode” and “QR Code” and the note on the trademarks are under Names and trademarks.

Inserting a code

The ribbon has the section “Codes” with the buttons “Barcode”, “QR code” and “EPC QR code (GiroCode)”, to the right of “Shapes” and to the left of “Tables”. A code is created immediately, without asking, and is selected afterwards.

Excerpt from the ribbon. On the left the button “Shapes” with the section name “Shapes” below it. To the right of it the section “Codes” with three buttons: “Barcode” with a symbol of vertical bars, “QR code” with a symbol of three corner squares and small dots and “EPC QR code (GiroCode)” with a similar symbol with a blue circle with a euro sign in its lower right corner. Below it is the section name “Codes”.
The “Codes” section in the ribbon.
  1. 1“Barcode” creates a barcode.
  2. 2“QR code” creates a QR code.
  3. 3“EPC QR code (GiroCode)” creates a QR code for SEPA transfers.
WayWhat happens
Ribbon, section “Codes”: click one of the three buttons The code is created in the same place as an image after a click on “Image” (see The ribbon: Where a click inserts).
Drag one of the three buttons onto the sheet The code is created at the drop point. Whether it goes into a group or is created as an object of its own on the sheet depends on what you release over (see The ribbon: Dropping by dragging and Groups: Which area of the group counts).
Group designer, column designer and cell designer: section “Codes” in the window’s ribbon Works as in the main window. The code goes into the opened group or cell; when dragged, it lies at the mouse position (see The ribbon in the group designer).

The type can later be changed only within the barcodes: For a barcode you choose another barcode under “Type”. A barcode does not turn into a QR code or vice versa; to do that, delete it and insert the other code.

The document number as a barcode

  1. In the ribbon, in the “Codes” section, click “Barcode”. A barcode of 50 × 15 mm lies on the sheet and is selected. On the right, the “Properties” window shows the label “Barcode”. On the canvas the box shows a gray pattern with the sentence “Sample — empty with the sample record” because no content has been entered yet.
  2. Double-click the code. The window “What should go into the barcode?” asks for the content (see The double-click on a code).
  3. Click “Fixed variable” and, in the “Choose variable” window, choose the field with the document number. In the “Content” field the document number appears as a blue placeholder with its name, for example “Rechnungsnummer”. Below it is “Result with the sample record:” with the number, and on the canvas the code appears with the number as plain text below it. Instead of the double-click, the button “Variable” under “Content” also leads to the same window.
  4. Adjust size and position: Drag the code’s handles, or enter width and height in the “Position & size” tab. The code fills the box as far as print-sharp fitting allows (see Fitted print-sharp).
  5. Check the result in the full preview (see Full preview and PDF). Every record shows its own code. If the code cannot be formed from the data of a document, nothing appears at that place, and the document reports the reason.

Inserting a GiroCode for the invoice

  1. In the ribbon, in the “Codes” section, click “EPC QR code (GiroCode)”. A GiroCode of 30 × 30 mm lies on the sheet and is selected. On the right are the fields of the transfer. The amount and the remittance text are prefilled if the primary source knows the matching fields; beneficiary and IBAN are empty and outlined in red.
  2. Double-click the code. The GiroCode window opens with all fields, the check and the appearance; at the top is the button “Visibility …” (see The double-click on a code). The same fields are also on the right in the “Properties” window.
  3. Under “Beneficiary” enter the name of the account holder, usually your company name, and under “IBAN” your IBAN. If both are in fields or custom variables, choose them with the button with the curly braces. The borders are no longer red; a chosen variable appears as a blue placeholder in the field. If something is still missing or invalid, a red line with the reason appears under the field.
  4. If the code should be missing for credit notes or without payment, click “Visibility …” and create a rule, for example “only if the amount is greater than 0”. At the top of the window it says “Printed only if:” with the rule. If the code is hidden, it is not checked.
  5. Check “Amount” and “Remittance text”. The amount must be a field without a formatter, for example {{totalamount}}, or a custom variable of type number or currency. Expanded, “Content of the code” shows what the code contains and how many of the permitted 331 bytes it is.
  6. Check the code in the full preview, and scan it with a banking app. The app shows beneficiary, IBAN, amount and remittance text.

What a new code starts with

ButtonBoxSettings
“Barcode” 50 × 15 mm Type Code 128; “Human-readable text below the code” on at 8 pt; “White margin (quiet zone)” on; bar color #000000, background #FFFFFF; no content; “If the content is empty”: print nothing. Tooltip: “Barcode (Code 128, EAN-13, EAN-8, Code 39 or ITF) — content from a field, a variable or fixed text”.
“QR code” 25 × 25 mm “Error correction” M; white margin on; colors as for the barcode; no content; print nothing if the content is empty. Tooltip: “QR code — content from a field, a variable or fixed text, for example a link”.
“EPC QR code (GiroCode)” 30 × 30 mm “Amount” and “Remittance text” prefilled, each on its own: amount {{totalamount}} if the primary source knows the field totalamount; remittance text “Rechnung {{invoicenumber}}” if it knows one of the fields invoicenumber, quotenumber or ordernumber (for a quote “Angebot …”, for an order “Auftrag …”, in the language of the template). Because text and variable stand together in it, the remittance text is stored as an if-then without a condition branch; the field shows “Rechnung” and the number as a blue placeholder. Beneficiary and IBAN stay empty. Tooltip: “EPC QR code (GiroCode) per EPC069-12 — QR code for SEPA credit transfers in euros”.

A new code starts with “Flowing on contact”, like a new image (see Positioning behavior: What a new object starts with).

What goes into the code

The content of a barcode or QR code is in the field “Content”. It is a variable, that is a field of the record or a custom variable, a fixed text or a value with if-then. As long as nothing is stored, the three buttons “Variable”, “If-then” and “Fixed text” are there; the double-click on the code asks the same (see The double-click on a code).

  • Variable: The button “Variable” (tooltip “Choose a variable — a field of the record or a custom variable, also a new one”) opens the field picker with the heading “Choose variable” (see Data tree and field picker: The field picker). The list does not offer image and file fields. At the bottom of the window, “New custom variable …” creates a custom variable and inserts it after saving. The chosen variable appears as a blue placeholder in the field, just like a variable in a text; a click on the placeholder chooses a different one, ✕ removes it. For a custom variable, the button with the @ sign opens the variable itself.
  • Only a variable, nothing next to it: You cannot write anything next to the placeholder. If the content is to be composed or calculated, for example Kd {{Customer.accountnumber}}-{{invoicenumber}}, create a custom variable for it and choose that (see Variables).
  • If-then: The button “If-then” opens the variable window with a fixed type Text and the heading “Value for »Content of the code«”. There is a default value and condition branches, for example a different number for a certain product type; the first branch whose condition is met wins (see Variables: If-then). In the default value and in the branches, text and fields may stand together. Afterwards the field shows the default value with placeholders and below it, for example, “If-then with 1 condition branch”; a click on it opens the window again, ✕ removes the value, as does “Delete” in the window.
  • Fixed text: The button “Fixed text” (tooltip “Fixed text — always the same content, for example a web address”) opens a small window “Fixed text for the barcode” or “… for the QR code”. What you enter there, for example https://www.example.com, goes into the code exactly like that; Enter or “Apply” accepts, “Cancel” and Esc change nothing. The window does not accept placeholders: “Placeholders do not belong in fixed text — use »Fixed variable« or »If-then«.” Afterwards the text appears as an ordinary input field under “Content”, without a blue placeholder; it can be changed there, ✕ removes it. The field does not accept placeholders there either.
  • Literal: The content goes into the code character by character, without formatting and without markup. A number or currency field yields the number with a decimal point, for example 1234.5. If you need a particular notation, use a custom variable of type Text with a formatter, for example {{Date:createdon|de-DE|yyyyMMdd}}.
  • Older templates: If the content mixes text and variable, for example from an older template or from the AI assistant, it is printed as before. The field shows it in gray, with the variables as placeholders, and below it “Older content: text and variables mixed — it is printed as before. You can change it as a custom variable or via if-then.” “Convert to custom variable” creates a custom variable of type Text with exactly this value and inserts it as a placeholder; the same is printed. “Edit as if-then” takes it as the default value of an if-then. Nothing is rewritten automatically.
  • In a table row the content belongs to the row: A field of the row yields its value in every row (see Codes in tables).
  • Page number: {{Page.Total}} (the total number of pages) works in the content of a code only in a group that appears on every sheet (header or footer). In the main part of the document the code is otherwise not printed: A barcode or QR code is left out and the document warns; for a GiroCode the document is not created.
  • Check: Under the field it says “Result with the sample record:” with the text that goes into the code, set in ‹ ›. A content consisting only of spaces counts as empty.

The double-click on a code

A double-click on a code opens what fits its content. This applies directly in the document, in a group, in a table cell and in a grid cell:

Double-click onWhat opens
a barcode or QR code without content The window “What should go into the barcode?” or “What should go into the QR code?” with the choice “Fixed variable”, “If-then” or “Fixed text”. “Fixed variable” opens the field picker “Choose variable”, “If-then” the variable window, “Fixed text” the window for fixed text. At the bottom left, “Visibility …” opens the visibility rule. “Cancel”, Esc or a click next to it change nothing.
a barcode or QR code with a variable The field picker “Choose variable” right away; another choice replaces the variable, closing without a choice changes nothing.
a barcode or QR code with if-then The variable window with the if-then right away.
a barcode or QR code with fixed text The window for fixed text right away, prefilled with the previous text.
a barcode or QR code with older content (text and variable mixed) The window with the choice, above it the previous content and the button “Convert to custom variable”. “Fixed variable” replaces the content, “If-then” takes it as the default value.
a GiroCode The GiroCode window with all fields, their check, “Content of the code” and the appearance, at the top the button “Visibility …”. “Done”, the ✕, Esc or a click next to it close it; every entry applies immediately.

If you remove the variable or the if-then, in the “Properties” window with ✕ or in the variable window with “Delete”, the next double-click asks again what should go into the code.

A window with the heading “What should go into the QR code?” and a ✕ at the top right. Below it the gray sentence “You can change or remove the content later in the »Properties« pane or again with a double-click.”. Three large buttons with borders follow: at the top, with a blue @ sign, “Fixed variable” and the explanation “Always the same variable: a field of the record, such as the invoice number, or a custom variable. If something is to be combined or calculated, create a new custom variable at the bottom of the next window.”, below it, with a blue diamond with a question mark, “If-then” and the explanation “A different content depending on a condition, for example a different number for a certain product type.”, at the bottom, with a large T, “Fixed text” and the explanation “Always the same fixed content, for example a web address or a fixed number — without a variable.”. At the bottom left the button “Visibility …”, at the bottom right “Cancel”.
The double-click on a QR code without content.
  1. 1“Fixed variable”: a field or a custom variable; the field picker opens.
  2. 2“If-then”: a different content depending on a condition; the variable window opens.
  3. 3“Fixed text”: a fixed content such as a web address, without a variable; a small window asks for the text.
  4. 4“Visibility …” opens the visibility rule of the code.
A window with the heading “GiroCode” and a ✕ at the top right. At the top a gray box with the blue button “Visibility …” and next to it “Printed only if: Gesamt greater than 0”. Below it the sentence “The customer’s banking app fills in the credit transfer from this code — euros only.” with an ⓘ. The fields follow: “Beneficiary” with the blue placeholder “Firmenname” and a ✕, “IBAN” with the placeholder “IBAN” and a ✕, “BIC” as an empty input field with the gray text “leave empty or enter a BIC” and two buttons (curly braces and a diamond with a question mark), “Amount” with the placeholder “Gesamt”, “Currency (check)” empty, the dropdown “Purpose of payment” with “Remittance text (free text)”, “Remittance text” with “Rechnung” and the placeholder “Rechnungsnummer”, below it “If-then without a condition branch”, then “Purpose code” and “Note to the payer” empty. At the bottom “Content of the code” to expand, the green line “QR code version 6, error correction M, one dot 0.593 mm.” and at the bottom right the blue button “Done”.
The double-click on a GiroCode. The field names are invented.
  1. 1“Visibility …” opens the visibility rule; next to it the rule is shown in words. If the code is hidden, it is not checked.
  2. 2A field with a variable: the blue placeholder, next to it ✕ to remove it.
  3. 3An empty field: type fixed text, choose a variable with the curly braces or create an if-then with the diamond.
  4. 4“Done” closes the window; your entries already apply.

The barcode types and their characters

For a barcode you choose the type under “Type”. Each type accepts only certain characters. If the content does not fit, the document does not print the code and names object and reason (see Empty and invalid); a wrong code is never printed.

TypeAcceptsSpecial features
“Code 128 (letters, digits, characters)” Letters without umlauts, digits, spaces and the usual punctuation (ASCII without control characters). The default and the best choice for document numbers. Spaces at the edge are part of the content. A line break or a character such as “€” is rejected. A formatter such as {{Currency:…}} brings such characters along, usually first the non-breaking space before the € sign, which the message calls U+00A0. If the content looks like it came from a formatter, the message asks about it. Insert numbers without a formatter.
“EAN-13 (article number)” 12 digits (the check digit is added) or 13 digits with check digit. If the check digit is wrong, the code is not printed; the message names the correct digit and the one present. Blank space at the edge is trimmed. The first digit appears in plain text to the left of the code.
“EAN-8 (short article number)” 7 digits (the check digit is added) or 8 digits with check digit. As for EAN-13, but without a digit to the left of the code.
“Code 39 (older scanners)” Digits, capital letters A–Z, spaces and the characters - . $ / + %. Only for older scanners that require it. Lowercase letters are not silently capitalized, because the scanner would get different data than in the field; the message recommends Code 128. The plain text shows the content without the start and stop characters.
“ITF (digits, even count)” Digits only, and an even number of them. An odd number is rejected; no zero is prepended. Blank space at the edge is trimmed. With fewer than 6 digits the code is printed, but the document writes a note on the data, and the “Properties” window warns: Many scanners read ITF only from 6 digits.

The QR code

A QR code accepts any text, including umlauts and special characters. Smart Templates chooses the size, that is the number of dots, itself: It takes the smallest QR code the content fits into. Write a link in full, for example https://www.example.com/rechnung/{{invoicenumber}}.

With “Error correction” you choose how much of the code may be damaged or covered before it can no longer be read:

LevelWhat it means
“L — 7 %”About 7% of the code may be unreadable. Few, large dots.
“M — 15 % (recommended)”About 15%. The default and the usual middle course.
“Q — 25 %”About 25%.
“H — 30 %”About 30%. The code becomes denser; at the same size the dots are smaller.

Exactly the chosen level applies; Smart Templates does not switch the code to a higher one by itself. If the content is too long for the largest QR code, at level M about 2,300 characters of text (umlauts count several times), the code is not printed, and the message gives the length and the maximum. The GiroCode always has level M; there is no choice of error correction for it.

The GiroCode

The GiroCode (EPC QR code per EPC069-12, known in Germany as GiroCode) is a QR code for SEPA transfers in euros. The customer’s banking app reads it and fills in the transfer. Print it on invoices that the customer pays by transfer. Unlike the other codes, it has fixed fields instead of a free content.

The fields

Excerpt of the right column “Properties” for a selected GiroCode. At the top the blue marker “GiroCode”, below it the tabs “General” (selected) and “Position & size”. First the section “Visibility” with the checkbox “Turn visibility rules on/off” and an ⓘ. Then the section “Content”: a gray sentence “The customer’s banking app fills in the credit transfer from this code — euros only.” with an ⓘ. The fields follow: “Beneficiary” with the blue placeholder “Firmenname”, “IBAN” with the placeholder “IBAN” and “Amount” with the placeholder “Gesamt”, each with a ✕ next to it; “BIC” and “Currency (check)” as empty input fields with gray text and two small buttons next to them (curly braces and a diamond with a question mark); the dropdown “Purpose of payment” with “Remittance text (free text)”; “Remittance text” with the word “Rechnung” and the placeholder “Rechnungsnummer”, next to it the diamond, an @ sign and a ✕, below it “If-then without a condition branch”; “Purpose code” and “Note to the payer” empty. Every label carries an ⓘ. Below it “Content of the code” is expanded and shows in typewriter font the lines BCD, 002, 1, SCT, an empty line, “Smart Templates Scantest”, the IBAN without spaces, EUR1486.91, two empty lines and “Rechnung RE-2026-1042”, plus “97 of 331 bytes” and in green “QR code version 6, error correction M, one dot 0.593 mm.”. At the bottom the section “Appearance” begins with the checkbox “White margin (quiet zone)”.
The properties of a GiroCode. The field names, the beneficiary and the IBAN are invented.
  1. 1“Visibility” is at the top, above the content: A hidden code is not checked, so its fields may be empty.
  2. 2A field with a variable: the blue placeholder, like a variable in a text. A click on it chooses a different one, ✕ removes it; you cannot write anything next to it.
  3. 3An empty field: type fixed text, choose a variable with the curly braces or create an if-then with the diamond. As long as a required field is empty, it has a red border.
  4. 4A value with if-then: text and variable together, here the prefill of the remittance text. The diamond opens the if-then, the @ sign saves the value as a custom variable.
  5. 5“Content of the code” shows what is in the code and how many of the permitted 331 bytes it is. The green line gives the size of the code.
  6. 6Below follow color, background and position as for the barcode.

Every field takes one of three forms: fixed text that you type into the input field, for example your IBAN; a variable, a field or a custom variable, chosen with the button with the curly braces (tooltip “Choose a variable — a field of the record or a custom variable, also a new one”), which then appears as a blue placeholder in the field; or if-then, created with the button with the diamond (tooltip “If-then — a different value depending on a condition”). Text and variable together, like “Rechnung” before the invoice number, go through if-then or a custom variable; you cannot write anything next to a placeholder. The input field does not accept curly braces: When you leave it, the previous text returns, and the message “Placeholders do not belong in fixed text — use »Variable« or »If-then«.” appears. ✕ empties a field again. A field in which text and variable are mixed from an older template is printed as before and shows the buttons “Convert to custom variable” and “Edit as if-then” (see What goes into the code).

FieldWhat goes inRules
“Beneficiary” The name of the account holder to whose account the money is transferred, usually your company name. Required, at most 70 characters.
“IBAN” The IBAN of this account. Required. Spaces and lowercase are allowed and are cleaned up. The form, the length for the country and the check digits are checked, and the country must take part in the SEPA scheme.
“BIC” The BIC of the bank of this account. Within the European Economic Area it may be missing. It is required for an IBAN from AD, AL, CH, GB, GI, MC, MD, ME, MK, RS, SM or VA. If a BIC is entered, it is always in the code; it must have 8 or 11 characters. If you have customers with a bank in Switzerland or in Great Britain, enter the BIC.
“Amount” The amount to be paid in euros. See The amount.
“Currency (check)” A field with the currency code of the document, for example the ISO code of the document currency. For checking only; it does not go into the code. If it yields anything other than EUR (or the € sign), the code is invalid. Empty means: no check.
“Purpose of payment” with “Remittance text” or “Reference” A free text, for example “Rechnung {{invoicenumber}}”, or a structured reference. The code carries only one of the two; the dropdown “Purpose of payment” switches; a value already entered moves along. The remittance text has at most 140 characters. The reference has at most 35 characters; an RF creditor reference per ISO 11649 is checked (check digits) and written without spaces and in capital letters, other structured references pass through unchanged.
“Purpose code” Optional: four capital letters per ISO 20022, for example GDDS (purchase of goods). Only the form is checked. The field usually stays empty.
“Note to the payer” Optional: a short note that the banking app shows to the payer. At most 70 characters. It is not transferred along with the payment.

All fields together may amount to at most 331 bytes; umlauts count double. The expandable area “Content of the code” shows the current state. A line break in a field becomes a space, and a character that many banks do not accept triggers a note; the code is created in both cases (see Problems and messages: Barcode, QR code and GiroCode).

The amount

Insert the field without a formatter: {{totalamount}}, not {{Currency:totalamount}}. With a formatter you get text such as “1.234,56 €”, and that is not an amount; the “Properties” window then shows the reason under the field. It is rounded to two decimal places. A summary such as {{sum(Positionen.betrag)}} rounds each line item to the “Decimal places (currency)” of the template before adding — the code contains the same amount as with {{Currency:sum(…)}}, even if the document shows the total as a number with more decimal places ({{Number:sum(…)}}). €0.01 to €999,999,999.99 are allowed. Zero and negative amounts make the code invalid. If the field stays empty, there is no amount in the code, and the payer enters it themselves.

You can insert a custom variable of type number or currency in the same way, for example {{@Brutto}}. Its value goes into the code, not its notation in the document: If {{@Brutto}} prints “1.486,91 €” in the text, the code contains EUR1486.91. If the value has more than two decimal places, for example 1486.905 from an invoice, it is rounded to two places, so to 1486.91, just as a variable of type currency with two decimal places prints it. If the variable shows different decimal places in the document, for example none, the code still contains the value rounded to two places. A variable of type Text is suitable if it contains the field without a formatter, for example {{totalamount}}; if {{Currency:…}} is in it, its value is not a number (see Variables: Type Text).

Saving as a custom variable

The button with the @ sign (tooltip “Save as custom variable — creates a custom variable with this value and inserts it here; then it can also be printed elsewhere”) is next to a field with fixed text or with if-then. It opens the window for a new custom variable of type Text, prefilled with the value of the field and a name such as “Zahlung IBAN”. Name and value can be changed in the window; Cancel changes nothing. After saving, the variable appears as the blue placeholder “Zahlung IBAN” in the field. This is how you also print the same IBAN as text in the footer. If the field already contains a custom variable, the same button opens that variable.

If “Beneficiary”, “IBAN” or “BIC” is empty and there is already a custom variable whose name looks like the field, for example “IBAN”, the designer offers it with a button under the field (label roughly: Use “@IBAN”). It never inserts it by itself.

What is checked

A GiroCode is checked with every record. If it is invalid, the document is not created, and the message names all reasons.

Caution

There is no built-in special handling for credit notes, amounts of 0 or currencies other than euro. If the GiroCode is visible there, it is invalid, and the document is not created. Hide it for those cases with a visibility rule, for example “only if the amount is greater than 0 and the currency is euro” (see Visibility: The visibility rule). A hidden GiroCode is not checked and not printed; its fields may then be empty. You open the rule in the “Properties” window at the very top under “Visibility” or in the GiroCode window (double-click) with “Visibility …”.

Also print beneficiary, IBAN and amount as text on the document; this is what the guideline provides for, and the customer can then transfer the money even without an app. The code should be at least 20 mm in size; below that a note appears (see Fitted print-sharp).

The settings of a code

The settings of a barcode or QR code are in the “Properties” window in the “General” tab, the position in the “Position & size” tab; in a group or cell everything is listed one below the other without tabs (see The properties panel: Which sections are where). At the very top of every code, also in a group or cell, is the section “Visibility”, below it “Content”. For the GiroCode, the fields of the transfer are under “Content”, below them the same “Appearance” as for a QR code, without “Error correction” and without “If the content is empty”.

Excerpt of the right column “Properties” for a selected barcode. At the top the blue marker “Barcode”, below it the tabs “General” (selected) and “Position & size”. First the section “Visibility” with the checkbox “Turn visibility rules on/off” and an ⓘ. Then the section “Content”: the dropdown “Type” with “Code 128 (letters, digits, characters)”, the field “Content” with the blue placeholder “Rechnungsnummer” and to the right of it a button with ✕. Below it “Result with the sample record: ‹RE-2026-1042›” and in green “Code 128, bar width 0.339 mm.”. Section “Appearance”: the checked checkbox “Human-readable text below the code”, the field “Text size (pt)” with 8, the checked checkbox “White margin (quiet zone)”, “Bar color” with a black field and #000000, “Background” with a white field and #FFFFFF, the dropdown “Position in frame” with “center (default)” and the dropdown “If the content is empty” with “print nothing”. The labels carry an ⓘ.
The properties of a barcode, “General” tab.
  1. 1“Visibility” is at the top, above the content.
  2. 2“Type”: only for a barcode; a QR code has “Error correction” here under “Appearance”.
  3. 3“Content”: the chosen variable as a blue placeholder. A click on it chooses a different one, ✕ removes it. Without content, the buttons “Variable”, “If-then” and “Fixed text” are here.
  4. 4What comes out with the sample record, and in green the size of the code. If there is a problem, a ⚠ with the reason appears here.
  5. 5“Human-readable text below the code”: only for barcodes.
  6. 6“White margin (quiet zone)”: the free margin that scanners need.
  7. 7“Position in frame”: where the code sits in the box.
  8. 8“If the content is empty”: what happens with a record without content.
SettingWhat it doesDefault
“Visibility” At the top, above the content. Prints the code only if a condition is met; a hidden code is not checked, so its values may be empty (see Visibility). always
“Type” Barcode only: Code 128, EAN-13, EAN-8, Code 39 or ITF (see The barcode types and their characters). Code 128
“Content” What the code contains: a variable as a blue placeholder, fixed text or a value with if-then (see What goes into the code). For the GiroCode, the fields of the transfer replace this row. empty
“Error correction” QR code only: L, M, Q or H (see The QR code). M
“Human-readable text below the code” Barcode only: prints the content legibly below the bars, helpful when a scanner refuses. For EAN the edge bars extend somewhat lower, and for EAN-13 the first digit is to the left of the code. The bars become shorter by the height of the plain text. on
“Text size (pt)” Font size of the plain text, 5 to 14 pt; the font is the default font of the template. A number outside is set to the limit, and the document reports it. 8 pt
“White margin (quiet zone)” The free margin around the code lies inside the box; the box is then everything the code needs. Turned off, the code fills the box without a margin; this is only right if there is enough free space around the box. on
“Bar color” The color of the bars or dots. Scanners read dark bars on a light background most reliably. If the bars are lighter than the background or differ too little, the window warns under the field “Content”. #000000
“Background” The area behind the code including the white margin, for a barcode the whole height of the box. An empty field makes the background transparent. #FFFFFF
“Position in frame” Where the code sits in the box if it is smaller than the box: in a corner, at an edge or centered. The same nine positions as for the image. A barcode fills the height completely; for it only left, center or right counts. center
“If the content is empty” Not for the GiroCode: “print nothing”, “print nothing and report” or “show placeholder” (see Empty and invalid). print nothing
“Position & size” tab “Positioning behavior”, “Width”, “Height” and “Rotation”, as for an image. The rotation allows only 0°, 90°, 180° and 270° (see Position, size, rotation and arrangement: Rotation). The code has no rotation handle. If the template contains a different angle, for example written by hand or by an AI, the code is printed that way; for a barcode the document then writes a note on the data, and the “Properties” window warns, because many scanners do not read slanted bars. A QR code and a GiroCode remain readable even when slanted. see What a new code starts with

A code has no border, padding or corner radius; put it in a group with a border for that (see Groups: Settings of the group).

Fitted print-sharp: size, quiet zone and plain text

The box is the largest area the code may take up. So that every bar becomes equally wide on the printer, a bar or a dot of the QR code is always a whole multiple of 1/600 inch (about 0.042 mm). The code is therefore often somewhat smaller than its box: a QR code by up to about 2 mm, a long barcode by up to about 8 mm. Where it sits in the box is determined by “Position in frame”. The sharpness applies when printing at original size; “Fit to page” in the print dialog cancels it.

The white margin

Every code needs a free margin, otherwise the scanner does not find it. With the checkbox “White margin (quiet zone)” it lies inside the box:

TypeMargin leftMargin right
QR code and GiroCode4 dots, likewise top and bottom4 dots
Code 128, Code 39, ITF10 bar widths10 bar widths
EAN-1311 bar widths7 bar widths
EAN-87 bar widths7 bar widths

Too small for the code

If the box is not enough for every bar and dot to be at least one print dot of 1/600 inch wide, or if it is too low for bars and plain text, the code is not printed (see Empty and invalid). In addition there are guideline values; if the code falls below them, it still prints, and the document writes a note on the data:

CodeGuideline value
BarcodeA bar at least 0.25 mm wide; for EAN at least 0.264 mm.
QR codeA dot at least 0.4 mm, so that phone cameras read it reliably.
GiroCodeAn edge length of at least 20 mm, measured including the white margin.

The “Properties” window shows the size of the code in green under the field “Content”, for example “Code 128, bar width 0.339 mm.”, and additionally warns if the bars are lower than 6 mm.

Empty and invalid

An empty content and an invalid content are two different cases:

CaseWhat happens
The content yields nothing for a record, for example an item without an EAN (not for the GiroCode) “If the content is empty” decides. With “print nothing” the spot stays silently empty and takes up no space: Objects below it do not move down because of it and never move up beyond their drawn position; a table row becomes only as high as its remaining content. With “print nothing and report” a note on the data is added. With “show placeholder” a gray box appears and keeps the space.
The content is invalid: a wrong EAN check digit, a character the type cannot handle, a content that is too long or a box that is too small The code is not printed, its spot keeps the space, and the document warns and names object and reason. With many table rows, the warning comes once per object and reason, with the number of further values.
A visible GiroCode is invalid or does not quite fit into its space The document is not created. The message names all reasons of all GiroCodes of the document; values from the document, for example IBAN and amount, are not in the text for privacy reasons but appear as ‹…› (see Problems and messages: When no document is created).
A code is hidden via its visibility rule It is not checked and not printed, even if its content were empty or invalid: no note, no warning, and a GiroCode does not stop the document. Its values may then be empty. In a table the rule applies per row.

Page edge and fixed bottom edge

A code is never split. If it no longer fits at the bottom of the sheet, it moves as a whole to the next one (see At the page edge: keep together or split). If it is the first object on its sheet, it stays like an image and extends beyond the bottom (see At the page edge: The first object on a sheet). A code is never cut off in the process: If it extends more than 0.5 mm beyond an edge of the paper, at the bottom, top or side, a barcode or QR code is left out, its spot stays empty, and the document warns; for a GiroCode the document is not created. What is measured is the outline the code takes up on the sheet, for a rotated code therefore the rotated one. This also applies in a group, a grid and in headers and footers. If the document splits a group at the page edge, a code in it goes completely onto the next sheet. So place a code so that it lies completely on the sheet. A group or cell with a fixed height cuts an image at its bottom edge, a code never: Half a QR code is unreadable, and a shortened barcode can be read incorrectly. It cuts only the gray placeholder of an empty code (“show placeholder”), like an image, and the document then warns as for a shape. If a code extends beyond the fixed bottom edge, it is left out and the document reports it; for a GiroCode the document is not created. If it starts only at or below it, it is not printed there, like any object, and the document reports it; a visible GiroCode prevents the document in that case as well. The canvas shows the part up to the wall with the sentence “The code extends beyond the fixed height — it is not printed.” or, for the GiroCode, “The code extends beyond the fixed height — the document is then not created.” (see Position, size, rotation and arrangement: What the wall does to an object). The gray placeholder of an empty code is also cut by the canvas like an image, without this sentence. A hidden code (visibility rule) is cut at the bottom edge there like any other object. If a group with a fixed height is inside another, the narrower bottom edge counts. At the edge of the paper it shows the code with a red dashed outline and the sentence “The code extends beyond the edge of the paper — it is not printed.” or, for the GiroCode, “The code extends beyond the edge of the paper — the document is then not created.”

Codes in tables: the EAN per line item

A code can be in a table cell, for example the EAN of every line item on a delivery note. To do this, you design the column in the column designer (see Cells, header row and page break: Designing with the double-click):

  1. Double-click a data cell of the column. The column designer opens.
  2. In the window’s ribbon, in the “Codes” section, click “Barcode”, and under “Type” choose the type, for example “EAN-13 (article number)”. The code lies in the cell and is selected.
  3. In the field “Content”, click “Variable” (or double-click the code and choose “Fixed variable”), and in the window choose the field of the row that contains the number. The field appears as a blue placeholder, for example “Produktnummer”. In every printed row it yields the number of that row’s record.
  4. Click “✕ Close” or press Esc. You are back on the sheet; the sample row shows the code.
A data table on the sheet with a blue header row and the columns “Pos.”, “Bezeichnung”, “Menge” and “EAN”. In the sample row below, the first three columns contain blue field markers (“Pos.-Nr.”, “Bezeichnung”, “Menge” and “Einheit”). In the “EAN” column is an EAN-13 barcode with the digits 4 006381 333931 below it.
A table with a column for the EAN. The numbers are invented.
  1. 1The column “EAN” has a barcode in the cell in the column designer.
  2. 2The canvas shows a sample row; in print, every row contains the code of its record.

The content belongs to the row: In every printed row the code with the number of its record appears. If an item has no EAN, the cell stays empty with “print nothing” and takes up no height; the row becomes as high as its remaining content. If the space should stay, choose “show placeholder” or set the minimum row height of the table (see Data tables: “General” tab: “Cells” section). A wrong EAN omits only this code: The row keeps its space, the other rows print, and the document reports it once per column and reason with the number of further values.

What the canvas shows

The canvas calculates every code itself, with the same method as printing, and shows it dot for dot the same. The content comes from the sample record; in a table from the sample row. Visibility rules otherwise have no effect on the canvas (see Visibility); for a code they decide whether it is checked (see below). A code can have four appearances:

A white group with a blue dashed edge and four boxes side by side. On the far left an EAN-13 barcode with the digits 4 006381 333931 below it. Next to it a red dashed box with the red text “⚠ EAN-13 ›4006381333932‹: The last digit should be 1, not 2 — probably a typo in the product data.”. Next to it a gray dashed box with pale gray bars and the caption “Sample — empty with the sample record”. On the far right a flat gray box with the caption “Placeholder (empty content)”.
The four appearances of a code on the canvas.
  1. 1A valid code, here an EAN-13 with plain text. This is how it appears in print.
  2. 2An invalid code: red dashed with the reason. In print nothing appears at that spot, and the space stays.
  3. 3An empty content: a gray pattern with the sentence “Sample — empty with the sample record”. It shows where and how large the code would be, and is never printed.
  4. 4An empty content with “show placeholder”: a gray box, as it is also printed.

If the visibility rule of a code is not met with the sample record, so it is hidden, the canvas shows a pale gray pattern with the sentence “Hidden (visibility rule) — not printed” and never a red error, even if its content were empty or invalid; that is also how it is printed, namely not at all. The “Properties” window then says under the content “With the sample record the code is hidden (visibility rule) — it is then neither printed nor checked; empty fields do no harm.” and shows no red lines. The same applies if the code itself has no rule but a group or table above it is hidden with the sample record: It is then also neither printed nor checked.

A code is also shown red dashed if it extends beyond the fixed height of a group or beyond the edge of the paper (see Page edge and fixed bottom edge); the gray placeholder of an empty code is not, it is cut at the fixed height. The canvas shows the part up to the fixed bottom edge; if less than 3 mm of the code lie above it, it shows the whole code red dashed — otherwise the marker would hardly be visible. In a data row, an empty code shows nothing, like an empty image, except with “show placeholder”. If the files for the encoding are missing, the box says “Encoders not loaded”, and the “Properties” window says under the field “Content”: “The encoders are not loaded — the canvas cannot show the code. It is printed anyway.”

What happens when printing

In the PDF a code is drawn from rectangles, not embedded as an image. It is never split (see Page edge and fixed bottom edge) and, according to Fitted print-sharp, is as large as the box allows. The messages that the document gives about codes are described with meaning and remedy under Problems and messages: Barcode, QR code and GiroCode.

Tip

Scan a new code before using it from the full preview or from a printout: a barcode with the scanner you will use later, a QR code with a phone and a GiroCode with a banking app.

Names and trademarks

GiroCode is the name commonly used in Germany for the EPC QR code (guideline EPC069-12 of the European Payments Council). All product and brand names mentioned belong to their respective owners. Smart Templates has no connection with the European Payments Council, the Deutsche Kreditwirtschaft, the Sparkassen-Finanzgruppe or S-Public Services GmbH.

QR Code is a registered trademark of DENSO WAVE INCORPORATED.

What changes in the document?

On the canvas

The code appears with the content of the sample record, dot for dot as in print, with plain text, white margin and position. Without content a gray pattern appears, with an invalid content a red dashed box with the reason, with “show placeholder” a gray box (see What the canvas shows). If the code is hidden with the sample record, a pale pattern with “Hidden (visibility rule) — not printed” appears, without an error; otherwise visibility rules have no effect on the canvas.

In the PDF

The code stands in the box fitted print-sharp, with the chosen color, the background and the rotation. An invalid barcode or QR code is missing, its spot keeps the space, and the document warns; an empty one takes up no space with “print nothing”. A visible, invalid GiroCode prevents the document. A code is never split and never cut off, neither at a fixed bottom edge nor at the edge of the paper (see Page edge and fixed bottom edge).