ByteScout BarCode Generator SDK - C# - Generate PharmaCode - ByteScout

ByteScout BarCode Generator SDK – C# – Generate PharmaCode

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – C# – Generate PharmaCode

How to generate pharmacode in C# and ByteScout Barcode SDK

This code in C# shows how to generate pharmacode with this how to tutorial

The sample source codes on this page shows how to generate pharmacode in C#. ByteScout Barcode SDK is the fully featured library to generate barcodes. Supports QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix and many other barcode types. Includes various options for barcode generation to ensure output quality, add barcodes to new or existing pdf files and images. It can be used to generate pharmacode using C#.

This code snippet below for ByteScout Barcode SDK works best when you need to quickly generate pharmacode in your C# application. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Free trial version of ByteScout Barcode SDK is available on our website. Documentation and source code samples are included.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
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(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode SDK Home Page

Explore ByteScout Barcode SDK Documentation

Explore Samples

Sign Up for ByteScout Barcode SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Barcode SDK Home Page

Explore ByteScout Barcode SDK Documentation

Explore Samples

Sign Up for ByteScout Barcode SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next