Generating Custom Bar Codes in Advanced Templates
You can edit the HTML markup source of your advanced template to add a custom bar code or QR code for any custom transaction you need. For example, you can add a custom bar code to a warehouse picking ticket. With a bar code scanner, a warehouse employee can retrieve relevant inventory information needed to complete the order.
In the Advanced Template Editor, edit the HTML markup source and use the BFO tag <barcode />
to create a custom bar code. For more information about editing the source code, see Source Code Editing in the Template Editor.
Don't modify markup source directly unless you have sufficient CSS and HTML knowledge. NetSuite doesn't provide support or training in CSS or HTML.
Be aware that the template editor may not function properly if you switch back to WYSIWYG mode after you have made edits in markup source mode. Some template content may not be represented correctly, may not be accessible for editing, or may not be displayed at all.
If these issues occur, you can preserve template content by not saving the template in WYSIWYG mode and switching back to markup source mode.
To add a custom bar code to an advanced template:
-
Open the advanced template in the template editor and click the Source Code toggle.
-
Scroll down to the portion of the HTML markup source where you want to create a bar code. Add the following code to the template and specify the
codetype
,showtext
, andvalue
parameters as required.<barcode codetype="qrcode" showtext="false" height="150" width="150" value="http://www.example.com/" />
Your custom bar code won't be visible in the Advanced Template Editor. You must generate a report using your template to see the bar code.
Parameter |
Type |
Required/Optional |
Description |
---|---|---|---|
|
string |
required |
Choose the bar code algorithm used to generate the bar code. For a list of supported bar code algorithms, see the following table. |
|
boolean
|
required |
If set to If set to Note: The following bar code types don't display the printed values below the bar code: |
|
string |
required |
Enter the information you want to encode using the bar code algorithm. Use the following table to decide which bar code type matches your needs — each type has its own length and character requirements. For example, you can encode a URL in an Note: If value contains characters that the bar code algorithm doesn't support, your template can generate an error. Confirm that the bar code algorithm supports the requirements of the value string. |
|
number |
optional |
Set the height of the bar code in pixels. Some bar code algorithms might ignore this parameter. Note: The height parameter is required for the |
|
number |
optional |
Set the width of the bar code in pixels. Some bar code algorithms might ignore this parameter. Note: The width parameter is required for the |
The following bar code algorithms are supported by advanced templates and the BFO report generator. For more information about each bar code type, see http://bfo.com/products/report/docs/userguide.pdf.
|
Type |
Supported Characters |
Length |
Example (with |
---|---|---|---|---|
|
2D matrix |
|
12 — 3832 |
![]() |
|
Linear |
|
Variable Note: Requires a Start and Stop character Use one of the following characters for the Start and Stop character: A, B, C, D, E, *, N, T |
![]() |
|
Linear |
|
Variable |
![]() |
|
Linear |
|
Variable |
![]() |
|
Linear |
|
Variable |
![]() |
|
Linear |
|
Variable |
![]() |
|
Linear |
|
Variable |
![]() |
|
Linear |
|
14 Maximum |
![]() |
|
2D matrix |
|
2335 Maximum |
![]() |
|
2D matrix |
|
2335 Maximum |
![]() |
|
Linear |
|
7 + checkdigit |
![]() |
|
Linear |
|
13+ checkdigit |
![]() |
|
2D height |
|
20, 25, 29, or 31 digits |
![]() |
|
2D matrix |
|
Maximum 92 ASCII characters |
![]() |
|
2D stacked |
|
Maximum 1850 ASCII characters or 2725 numeric characters |
![]() |
|
Linear |
|
5, 9, or 11 + check digits |
![]() |
|
2D matrix |
|
Maximum 1520 ASCII characters or 2509 numeric characters |
![]() |
|
2D height |
|
Variable |
![]() |
Related Topics
- Source Code Editing in the Template Editor
- Source Code Editing to Customize Advanced Templates
- Syntax for Advanced Template Fields
- Setting a Template to Use a Font Unavailable in NetSuite
- Languages for Printed Forms that Use Advanced Templates
- Adding Striping to Line Items in Advanced Templates
- Adding Page Breaks to Tables
- Printing Subsidiary Logo on Advanced Templates
- Adding Apply Sublist to Check Templates
- Using FreeMarker to Work with Hidden Fields Used in Advanced Templates
- Adding Bar Codes in Advanced Templates