Created
September 9, 2025 12:09
-
-
Save aspose-com-gists/154a00b1a182012f05adb2289a0efe91 to your computer and use it in GitHub Desktop.
Generate Royal Mail 4-State Customer Code in C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Aspose.BarCode; | |
| using Aspose.BarCode.Generation; | |
| // Set the path for the working directory and load the Aspose license. | |
| string path = "data"; | |
| License lic = new License(); | |
| lic.SetLicense("License.lic"); | |
| // Define the type of barcode you want to generate (here: RM4SCC) | |
| // Initialize a BarcodeGenerator instance with EncodeTypes and the code text. | |
| BarcodeGenerator gen = new BarcodeGenerator(EncodeTypes.RM4SCC, "IUY6BS00"); | |
| // Set the width of barcode elements (X-dimension) in pixels | |
| gen.Parameters.Barcode.XDimension.Pixels = 3; | |
| // Save the generated barcode image in PNG format to the specified path. | |
| gen.Save($"{path}RM4SCC.png", BarCodeImageFormat.Png); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment