The code displayed below will guide you to install an C# app to generate pharmacode with barcode sdk. What is ByteScout Barcode Suite? It is the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK. It can help you to generate pharmacode with barcode sdk in your C# application.
These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Barcode Suite. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. Applying C# application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.
You can download free trial version of ByteScout Barcode Suite from our website with this and other source code samples for C#.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
using System; using System.Diagnostics; using System.Drawing; using System.Drawing.Imaging; using Bytescout.BarCode; namespace GeneratePharmaCode { class Program { static void Main(string[] args) { try { // Create new barcode using (Barcode barcode = new Barcode()) { barcode.RegistrationName = "demo"; barcode.RegistrationKey = "demo"; // Set symbology barcode.Symbology = SymbologyType.PharmaCode; // optional margins barcode.Margins = new Margins(5, 5, 5, 5); // Set Value barcode.Value = "12345"; // Set PharmaCode options: //barcode.Options.PharmaCodeSupplementaryCode = true; //barcode.Options.PharmaCodeSupplementaryBarColor = Color.Orange; //barcode.Options.PharmaCodeMiniature = true; //barcode.Options.PharmaCodeTwoTrack = true; // Save 300 DPI Image barcode.ResolutionX = barcode.ResolutionY = 300; barcode.SaveImage("300dpi.png", ImageFormat.Png); // Save 600 DPI Image barcode.ResolutionX = barcode.ResolutionY = 600; barcode.SaveImage("600dpi.png", ImageFormat.Png); } // Show image in default image viewer Process.Start("300dpi.png"); Process.Start("600dpi.png"); } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine("Press enter key to exit..."); Console.ReadLine(); } } }
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: