What Royal Mail Mailmark is
Royal Mail Mailmark is the UK's own structured Data Matrix-based mail barcode. bwip-js delegates its own symbol drawing entirely to its Data Matrix encoder -- confirmed directly: bwipp_mailmark looks up a fixed Data Matrix version/shape pair from its own required "type" option, forces both into the options handed to the delegate, and calls bwipp_datamatrix().
Generate it now
Choose a Mailmark type (7, 9, or 29), then enter your Mailmark-formatted data (beginning with the literal "JGB " identifier) to see a live preview.
Valid input
type is required -- there is no default; omitting it hard-fails ("Royal Mail Mailmark type must be 7, 9 or 29"). The payload must be at least 45 characters of Mailmark-formatted data ("Royal Mail Mailmark must contain at least 45 characters of Mailmark formatted data, including any required space padding") and must begin with the literal 4-character identifier "JGB " ("Royal Mail Mailmark must begin with JGB<space> identifier"). bwip-js/BWIPP itself does not parse or validate the meaning of the fixed-position fields inside that 45+-character data string (postcode, mail class, and the other fields Royal Mail's own Mailmark specification defines) -- it only enforces the length and the "JGB " prefix, then encodes the text through Data Matrix's C40 text mode with a fixed 45-character C40 header length. A working real example is "JGB 0000000000000001AB19XY1A " (45 characters, padded with trailing spaces) with type 7.
Key options
The only typed option is type: 7 selects a 24x24 square symbol, 9 selects a 32x32 square symbol, and 29 selects a 16x48 rectangular symbol. type has no auto-selected default at all -- a value must always be chosen. type also fixes the inner Data Matrix format (square for 7/9, rectangle for 29); this is set automatically and cannot be overridden separately.
Output and printing
Export SVG for vector-precise mail-piece artwork or PNG for a quick proof.
Common uses
Royal Mail Mailmark appears on UK mail pieces to encode postage, routing, and mail-class information as part of Royal Mail's own Mailmark barcode scheme.
Example
See the live preview above, seeded with a bwip-js-verified valid value at type 7.
Size guidance
Overall symbol size and shape are fixed entirely by the chosen type (24x24, 32x32, or 16x48) -- confirmed directly against bwipp_mailmark's own type-to-version lookup table.
Troubleshooting
A rejected render is usually a missing/invalid type (only 7, 9, or 29 are accepted), a payload shorter than 45 characters, a payload not beginning with "JGB ", or -- for the smaller type 7 symbol specifically -- a payload too long for its own smaller data capacity ("Maximum length exceeded or invalid size").
Related formats
Related formats: Data Matrix (the underlying 2D symbology this capability delegates its symbol drawing to, already in this catalog) and Royal Mail 4-State Customer Code (the UK's older 4-state linear postal barcode, already in this catalog, a separate real symbology, not a variant of Mailmark).
FAQ
Does bwip-js validate the postcode or mail-class fields inside a Mailmark payload?
No -- bwip-js/BWIPP only enforces the overall length (at least 45 characters) and the literal "JGB " prefix. It does not parse or validate the meaning of the individual fixed-position fields Royal Mail's own Mailmark specification defines inside that data.
Is type optional?
No -- type has no usable default at all. Omitting it hard-fails unconditionally, the same shape as rectangularmicroqrcode's own required version option.