Skip to main content

QR & Extended ID Length

QR Code Max Capacities (Binary Encoding)

While multiple encoding methods exist, Scantrust uses binary encoding for the URLs we generate. This allows the use of lower case characters, needed for both case sensitive url paths and the standard compact-12 extended-id format.

  • The "Version" determines the number of cells & thus the max capacity
  • The "Error Correction Level" (L/M/Q/H) keeps the code readable in the event of damage
    • The Secure Graphic or Logo is considered requires level Q or higher
VersionSize (Cells)L (7%)M (15%)Q (25%)H (30%)
v641x411341067458
v537x37106846044
v433x3378624634
v329x2953423224

Scantrust Secure Codes use v4 and level Q (46) by default. This can be changed with the assistance of a Scantrust Engineer.

Code Ingestion & QR Length Validation

SID Codes (No Secure Graphic)

Only the extended-id "maximum length" rule is enforced (100). Compaibility with a specific QR version / error correction level is not checked.

Because an SID code can be printed in any QR code version desired, the project implementation team to ensure compatibility with any packaging constraints.

SSC Codes w/ Secure Graphic

SSC codes require strict adherence to the length limits of the QR code. This limit is enforce for all code formats (GS1, Custom) at upload time.

Wherever possible we check the code type used in the workorder. If that is not available we will use the rules below to calcualte the maximum length:

  • For "post print" ingestion, the work order's code type is used
  • For "pre print" ingestion
    • If a "custom layout" was used, use that code type
    • If no custom layout was used, SG Inside, Hybrid=Yes is assumed
SG PositionHybrid Printing?Level + ECLMax Length
InsideNov4 + Q46 (default)
OutsideNov3 + L53
InsideYesv4 + H34
OutsideYesv4 + L78

To calculate the maximum length of the extended-id allowed for your upload:

  1. Take the max length as indicated in the table above, or from the workorder
  2. Subtract the length of the prefix before your extended id:
    • For default code spaces - Use 20, e.g. https://xxxx.st4.ch/
    • For custom domains, use the length of your domain + prefix + https:// (8)
  3. Subtract 1 for the dividing /

For example, for a standard code, non-hybrid:

  1. The max length is 46
  2. Subtract 20 for the code space domain, e.g. "https://xxxx.st4.ch/"
  3. Leaving a max length of 26

Additional Information


Extended ID Format Rules

In addititon to the length check performed above, some standard rules are applied to the extended ID. In normal useage these rules are unlikely to be violated.

RuleValueRemarks
Maximum Length100Absolute max length of any extended id.
Content (GS1)a-z,A-Z, 0-9, -, _, /GS1 values (such as GTIN) are checked against the GS1 spec.
Content (Custom)a-z, A-Z, 0-9, -,_Custom codes follow the same rules as the compact-12 spec.