Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Sets options for barcode creation.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Barcode | 4.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Option1 | The first option. | 1 | Optional |
Option2 | The second option. | 1 | Optional |
Option3 | The third option. | 1 | Optional |
Returns OK.
Set better ECC level for QRCode:
MBS( "Barcode.SetOptions"; 3)
Set square option for data matrix:
MBS( "Barcode.SetOptions"; 0; 0; 100 )
Create QRCode with UTF-8 and size 10:
Set Field [Barcode Generation::Image; ""]
#Better error correction and size 10
Set Variable [$r; Value:MBS( "Barcode.SetOptions"; 3; 10 )]
#Generate QRCode with UTF-8
Set Variable [$img; Value:MBS("Barcode.Generate"; "QRCode"; Barcode Generation::Text; 0; 0; 0; 1; 0; 1; "UTF-8")]
If [GetAsNumber($img) > 0]
Set Field [Barcode Generation::Image; MBS( "GMImage.WriteToPNGContainer"; $img; "barcode.png")]
Set Variable [$r; Value:MBS( "GMImage.Release"; $img )]
End If
Create a data matrix barcode with size 10 and return as container:
Let ( [
// set options for Size 10 (32x32) square for data matrix
r = MBS("Barcode.SetOptions"; 0; 10; 100);
// create a data matrix barcode
p = MBS("Barcode.Generate"; "DATAMATRIX"; "12818670,3,1" ; 0; 0; 0; 4);
// success?
e1 = MBS("IsError");
// save as PNG
image = MBS( "GMImage.WriteToPNGContainer"; p; "barcode.png" );
// success?
e2 = MBS("IsError");
// free image from memory
r = MBS("GMImage.Release"; p)
// return container if no error
]; If(e1 = 0 and e2 = 0; image; "") )
Create Maxicode with mode 3:
Set Variable [ $p ; Value: "196LS97TF826004" // primary text ]
Set Variable [ $t ; Value: "1Z42015596UPSN123W123456/11NLEEDS" // second text ]
Set Variable [ $r ; Value: MBS("Barcode.SetOptions"; 3) ]
Set Variable [ $r ; Value: MBS("Barcode.SetPrimary"; $p) ]
Set Variable [ $img ; Value: MBS("Barcode.Generate"; "maxicode"; $t) ]
Created 18th August 2014, last changed 22nd February 2020
Barcode.SetOption - Barcode.SetPrimary
Feedback: Report problem or ask question.