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
- The Secure Graphic or Logo is considered requires level
Version | Size (Cells) | L (7%) | M (15%) | Q (25%) | H (30%) |
---|---|---|---|---|---|
v6 | 41x41 | 134 | 106 | 74 | 58 |
v5 | 37x37 | 106 | 84 | 60 | 44 |
v4 | 33x33 | 78 | 62 | 46 | 34 |
v3 | 29x29 | 53 | 42 | 32 | 24 |
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 Position | Hybrid Printing? | Level + ECL | Max Length |
---|---|---|---|
Inside | No | v4 + Q | 46 (default) |
Outside | No | v3 + L | 53 |
Inside | Yes | v4 + H | 34 |
Outside | Yes | v4 + L | 78 |
To calculate the maximum length of the extended-id
allowed for your upload:
- Take the max length as indicated in the table above, or from the workorder
- 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)
- For default code spaces - Use
- Subtract 1 for the dividing
/
For example, for a standard code, non-hybrid:
- The max length is
46
- Subtract
20
for the code space domain, e.g. "https://xxxx.st4.ch/"- 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.
Rule | Value | Remarks |
---|---|---|
Maximum Length | 100 | Absolute 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. |