What UPC-A Composite is
UPC-A Composite pairs a standard UPC-A linear barcode with a linked GS1 Composite Component (a small 2D symbol printed directly above it) carrying supplementary GS1 Application Identifier data. bwip-js requires a pipe-delimited "<UPC-A>|<composite-component-data>" payload, delegating the linear half to its UPC-A encoder and the composite half to its GS1 Composite Component encoder -- confirmed directly and empirically: a missing pipe is rejected outright ("A Composite Component must be provided following a pipe character").
Generate it now
Enter a value in the form "<12-digit UPC-A>|<GS1 AI composite data>" to see a live preview.
Valid input
The value must contain a pipe character separating two parts. The first part must be a valid 12-digit UPC-A with a correct check digit -- validated by this capability's own internal UPC-A encoder call, confirmed empirically that a wrong check digit is rejected ("Incorrect UPC check digit provided"). The second part must be valid GS1 Application Identifier data (parenthesized AI codes followed by their values) -- bwip-js re-processes it through its own GS1 AI parser (prefixed internally with a dummy GTIN for validation purposes) before handing it to the composite-component encoder, and confirmed empirically that this genuinely enforces real GS1 structure: an unrecognized AI is rejected ("Unrecognised AI"), an AI (11) production date with an invalid calendar month is rejected ("Invalid month"), and an AI (00) SSCC value with a wrong GS1 Mod-10 check digit is rejected ("Bad checksum"). A working real example is "036000291452|(10)ABC123" (a valid UPC-A paired with an AI (10) batch/lot number).
Key options
Supported options include guardwhitespace and height. Real, literal defaults: guardwhitespace false (no quiet-zone guard-whitespace indicators drawn), height auto-computed from the symbol's own internal layout.
Output and printing
Export SVG for vector-precise retail-shelf artwork or PNG for a quick proof.
Common uses
UPC-A Composite is used where a standard UPC-A retail item also needs to carry supplementary data (such as a batch/lot number, best-before date, or promotional information) that a plain UPC-A symbol has no room to encode, while remaining scannable as an ordinary UPC-A by readers that ignore the composite component.
Example
See the live preview above, seeded with a bwip-js-verified valid value.
Size guidance
A fixed height in millimetres changes the overall rendered symbol height. Reading bwipp_upcacomposite's own function body in isolation would suggest height has no effect (it unconditionally deletes any caller-supplied "height" key from its own internal options object before building its final render request) -- but rendering through the real production path shows bwip-js's own top-level wrapper still uses the original caller-supplied value earlier in that same call path, confirmed empirically and monotonically across several heights.
Troubleshooting
A rejected value usually means a missing pipe character, an incorrect UPC-A check digit, or an unrecognized or malformed GS1 AI in the composite portion.
Related formats
Related formats already in this catalog: the standalone UPC-A generator (permanent cohort, no composite component) and GS1 Composite Component (Batch 7, the standalone 2D piece this capability pairs with a linear UPC-A).
FAQ
What goes before and after the pipe character?
A valid 12-digit UPC-A (with a correct check digit) goes before the pipe; valid GS1 Application Identifier data (parenthesized AI codes followed by their values) goes after it.
Does the composite-component data get validated, or does anything render?
It genuinely gets validated -- confirmed empirically across multiple violation classes (unrecognized AI, invalid calendar month, wrong GS1 check digit), each independently rejected with its own specific error, not merely accepted because it superficially looks like bracketed data.