JSON API - addBarcode

addBarcode

PREMIUM TRIAL / ADVANCED

Inserts a barcode field.

Note

You are reading the JSON API documentation. For the PHP API method please go to addBarcode.

JSON data

Styles from addText can be used.

Key Description
content Hyperlink or text.
type
  • QR
  • CODE128
  • CODE39
  • JPPOST
  • EAN8|EAN13
  • JAN8|JAN13
  • UPCA|UPCE
  • NW7
  • ITF14
  • CASE
switchers
  • \h value: height in twips of the barcode symbol.
  • \s value: scaling factor of the barcode symbol. Percentage points from 10 to 1000.
  • \q value: error correction level of QR Code. Valid values: 0 - 3. Default for QR if $switchers is empty: "\q 3".
  • \p value: style of a Point of Sale barcode (barcode types UPCA|UPCE|EAN13|EAN8). Valid values: STD|SUP2|SUP5|CASE.
  • \x: fixes the check digit if it’s invalid.
  • \d: adds Start/Stop characters for barcode types NW7 and CODE39.
  • \c value: style of a Case Code for barcode type ITF14. Valid values: STD|EXT|ADD.
  • \r value: rotation of the barcode symbol. Valid values: 0 -3.
  • \f value: foreground color of the barcode symbol. RGB.
  • \b value: background color of the barcode symbol. RGB.
  • \t: display barcode data (text) along with image.
Code samples

Example #1

Release notes
  • phpdocx 18.0:
    • new action.