You can customize the barcodes generated using the Barcode Manager based on your requirements. MobileScan setup comes with the following default files:
-
Default template - default.html
-
Default Cascading Style Sheet (CSS) - templateStyles.CSS
Location: \\<MobileScan base folder>\Web\www\barcode-manager\css
To edit or create a template, you must have MOBILE_TEMPLATE privilege assigned to your role.
-
Select Manage Barcode Templates from the Barcode Manager drop down list.
-
Select a template and click , to change the default template,
-
For the changes to be reflected in the database, you must save the selection before you leave the screen.
-
The default template is always preselected while printing barcodes. Based on your requirement, you can change the template from the Templates list.
-
-
Click to create a template.
-
Type the name in the Name box.
-
Type the required code in the Template Box.
You can write your own code or use the following sample code:
<li className="col-xs-6">
<h1 className="barcode">*{props.barcode}*</h1>
<p>{props.project}</p>
<p>{props.commodityCode}</p>
<p className="ellipsis">{props.description}</p>
<p>
<svg viewBox={props.qrCodeSize}>
<path d={props.qrCodePath}></path>
</svg>
</p>
</li>
-
Any parameter that is passed to the RestAPI must match the regular expression {props.xxxxx} where xxxxx denotes properties that are listed in the barcode.csv file.
-
You can customize style, width, font sizes and so on and reference the styles from the barcode template. For example:
-
In templateStyles.CSS, if you define a style, listItemStyle:
#listItemStyle {
width: 75mm;
font-size: 9pt;
text-align: left;
margin-left: 0px;
padding-left: 0px;
}
-
<span id="spanStyle">
-
<li id="listItemStyle">
You can reference the style in the barcode template as: <div id="divAlign">
-
-
You must edit all the existing templates to ensure that code matches the regular expression {props.xxxxx} where xxxxx denotes properties that are listed in the barcode.csv file. Templates that do not match the regular expression will not be displayed in the list of templates when you print the barcodes.
-
-
Click .