Adding Barcodes to a PDF
Add different types of Barcodes to PDFs using DynamicPDF Core Suite for .NET. Core Suite supports over thirty different barcodes, as the following C# examples illustrate.
Supported Barcodes
DynamicPDF Core Suite for .NET supports adding the following barcodes to a PDF.
How to Add Codabar to PDF
The following steps and C# sample code illustrate adding a Codabar barcode to PDF document.
Steps for Adding Codabar to a PDF Document
- Create a
Documentobject. - Create a
Pageobject and add it to the Document instance. - Create a
Codabarobject and set its parameters. - Add the
Codabarto thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Codabar barcode = new Codabar("A1234B", 50, 0, 48);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Code11 to PDF
The following steps and C# sample code illustrate adding a Code11 barcode to a PDF document.
Steps for Adding Code11 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Code11object and set its parameters. - Add the
Code11to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Code11 barcode = new Code11("12345678", 50, 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Code128 to PDF
The following steps and C# sample code illustrate adding a Code128 barcode to a PDF document.
Steps for Adding Code128 to a PDF Document
- Create a
Documentobject. - Create a
Pageobject and add it to the Document object instance. - Create a
Code128object and set its parameters. - Add the
Code128to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Code128 barcode = new Code128("Code 128 Barcode.", 50, 50, 48, 0.75F);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Code25 to PDF
The following steps and C# sample code illustrate adding a Code25 barcode to a PDF document.
Steps for Adding Code25 to a PDF Document
- Create a
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Code25object and set its parameters. - Add the
Code25to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Code25 barcode = new Code25("1234567890", 50, 100, 48);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Code39 to PDF
The following steps and C# sample code add a Code39 barcode to a PDF document.
Steps for Adding Code39 to a PDF Document
- Create a
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Code39object and set its parameters. - Add the
Code39to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Code39 barcode = new Code39("CODE 39", 50, 150, 48);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Code93 to PDF
The following steps and C# sample code add a Code93 barcode to a PDF document.
Steps for Adding Code93 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Code93object and set its parameters. - Add the
Code93to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Code93 barcode = new Code93("CODE 93", 50, 150, 48);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add EAN8 to PDF
The following steps and C# sample code illustrate adding a EAN8 barcode to a PDF document.
Steps for Adding EAN 8 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
Ean8object and set its parameters. - Add the
Ean8to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ean8 barcode = new Ean8("12345670", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add EAN8Sup2 to PDF
The following steps and C# sample code add a EAN 8 Supplement 2 (EAN8Sup2) barcode to a PDF document.
Steps for Adding EAN 8 Supplement2 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Ean8Sup2object and set its parameters. - Add the
Ean8Sup2to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ean8Sup2 barcode = new Ean8Sup2("1234567012", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add EAN 8 Supplement5 to PDF
The following steps and C# sample code add a EAN 8 Supplement 5 (EANSup5) barcode to a PDF document.
Steps for Adding EAN 8 Supplement5 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Ean8Sup5object and set its parameters. - Add the
Ean8Sup5to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ean8Sup5 barcode = new Ean8Sup5("1234567012345", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add EAN13 to PDF
The following steps and C# sample code add a EAN13 barcode to a PDF document.
Steps for Adding EAN13 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Ean13object and set its parameters. - Add the
Ean13to thePageobject instance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ean13 barcode = new Ean13("123456789012", 50, 300);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add EAN13 Supplement2 to PDF
The following steps and C# sample code add a EAN 13 Supplement 2 barcode to a PDF document.
Steps for Creating a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to the document. - Create a
Ean13Sup2object and set its parameters. - Add the
Ean13Sup2to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ean13Sup2 barcode = new Ean13Sup2("12345678901212", 50, 400);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Ean13Supplement5 to PDF
The following steps and C# sample code add a EAN 13 Supplement 5 barcode to a PDF document.
Steps for Adding Ean13Sup2 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Ean13Sup5object and set its parameters. - Add the
Ean13Sup5to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ean13Sup5 barcode = new Ean13Sup5("12345678901212345", 50, 500);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add UpcVersionA to PDF
The following steps and C# sample code add a UPC-A barcode to a PDF document.
Steps for Adding UpcVersionA to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
UpcVersionAobject and set its parameters. - Add the
UpcVersionAto thePageobject instance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
UpcVersionA barcode = new UpcVersionA("12345678901", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add UpcVersionA Supplement2 to PDF
The following steps and C# sample code add a UPC-A Supplement 2 barcode to a PDF document.
Steps for Adding UpcVersionA Supplement2 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
UpcVersionASup2object and set its parameters. - Add the
UpcVersionASup2to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
UpcVersionASup2 barcode = new UpcVersionASup2("1234567890112", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add UpcVersionA Supplement5 to PDF
The following steps and C# sample code add a UPC-A Supplement 5 barcode to a PDF document.
Steps for Adding UpcVersionA Supplement5 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
UpcVersionASup5object and set its parameters. - Add the
UpcVersionASup5instance to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
UpcVersionASup5 barcode = new UpcVersionASup5("1234567890112345", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add UpcVersionE barcode to PDF
The following steps and C# sample code add a UPC-E barcode to a PDF document.
Steps for Adding UpcVersionE to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
UpcVersionEobject and set its parameters. - Add the
UpcVersionEto thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
UpcVersionE barcode = new UpcVersionE("0123456", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add UpcVersionE Supplement2 to PDF
The following steps and C# sample code illustrate adding a UPC-E Supplement 2 barcode to a PDF document.
Steps for Adding UpcVersionE Supplement2 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
UpcVersionESup2object and set its parameters. - Add the
UpcVersionESup2to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
UpcVersionESup2 barcode = new UpcVersionESup2("012345612", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add UpcVersionE Supplement5 to PDF
The following steps and C# sample code add a UPC-E Supplement 5 barcode to a PDF document.
Steps for adding UpcVersionE Supplement5 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
UpcVersionESup5object and set its parameters. - Add the
UpcVersionESup5object toPageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
UpcVersionESup5 barcode = new UpcVersionESup5("012345612345", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Ean14 to PDF
The following steps and C# sample code illustrate adding a EAN 14 barcode to a PDF document.
Steps for Adding EAN14 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Ean14object and set its parameters. - Add the
Ean14instance toPageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ean14 barcode = new Ean14("1234567890123", 50, 50, 48, 0.75F);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add GS1 DataBar to PDF
The following steps and C# sample code add a GS1 DataBar barcode to a PDF document.
Steps for Adding GS1 DataBar to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
GS1DataBarobject and set its parameters. - Add the
GS1DataBarobject toPageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
GS1DataBar barcode = new GS1DataBar("(01)9889876543210", 50, 50, 50, GS1DataBarType.Omnidirectional);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Stacked GS1 DataBar to PDF
The following steps and C# sample code illustrate adding a Stacked GS1 DataBar barcode to a PDF document.
Steps for Adding Stacked GS1 DataBar to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
StackedGS1DataBarobject and set its parameters. - Add the
StackedGS1DataBarobject to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
StackedGS1DataBar barcode = new StackedGS1DataBar("(01)9889876543210", 50, 50, 50, StackedGS1DataBarType.Stacked);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add IATA-25 to PDF
The following steps and C# sample code illustrate adding an IATA 25 barcode to a PDF document.
Steps for Adding IATA-25 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Iata25object and set its parameters. - Add the
Iata25object to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Iata25 barcode = new Iata25("1234567", 50, 100, 48);
barcode.IncludeCheckDigit = true;
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Interleaved25 to PDF
The following steps and C# sample code illustrate adding an Interleaved 2 of 5 barcode to a PDF document.
Steps for Adding Iterleaved25 a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Interleaved25object and set its parameters. - Add the
Interleaved25instance to thePageobject instance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Interleaved25 barcode = new Interleaved25("1234567890", 50, 200, 48);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISBN to PDF
The following steps and C# sample code illustrate adding a ISBN barcode to a PDF document.
Steps for Adding an ISBN to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Isbnobject and set its parameters. - Add the
Isbnobject to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Isbn barcode = new Isbn("978-1-23-456789-7", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISBN Supplement2 to PDF
The following steps and C# sample code illustrate adding a ISBN Supplement 2 barcode to a PDF document.
Steps for Adding ISBN Supplement2 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
IsbnSup2object and set its parameters. - Add the
IsbnSup2object to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
IsbnSup2 barcode = new IsbnSup2("978-1-23-456789-7", "12", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISBN Supplement5 to PDF
The following steps and C# sample code illustrate adding a ISBN Supplement 5 barcode to a PDF document.
Steps for Adding ISBN Supplement5 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
IsbnSup5object and set its parameters. - Add the
IsbnSup5instance to thePageobject instance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
IsbnSup5 barcode = new IsbnSup5("978-1-23-456789-7", "12345", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISMN to PDF
The following steps and C# sample code add a ISMN barcode to a PDF document.
Steps for Adding ISMN to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Ismnobject and set its parameters. - Add the
Ismnobject to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Ismn barcode = new Ismn("979-0-1234-5678", 50, 300);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISMN Supplement2 to PDF
The following steps and C# sample code add a ISMN Supplement 2 barcode to a PDF document.
Steps for Adding ISMN Supplement2 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject instance. - Create a
IsmnSup2object and set its parameters. - Add the
IsmnSup2object to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
IsmnSup2 barcode = new IsmnSup2("979-0-1234-5678", "12", 50, 300);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISMN Supplement5 to PDF
The following steps and C# sample code illustrate adding an ISMN Supplement 5 barcode to A PDF document.
Steps for Adding ISMN Supplement5 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
IsmnSup5object and set its parameters. - Add the
IsmnSup5object instance to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
IsmnSup5 barcode = new IsmnSup5("979-0-1234-5678", "12345", 50, 300);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISSN to PDF
The following steps and C# sample code illustrate adding a ISSN barcode to a PDF document.
Steps for Adding ISSN to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
Issnxobject and set its parameters. - Add the
Issnobject instance to thePageobject. - Save the PDF Document.
Sample code - C#
Document document = new Document();
Page page = new Page();
Issn barcode = new Issn("977-1234-56700", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISSN Supplement2 to PDF
The following steps and C# sample code add an ISSN Supplement 2 barcode to a PDF document.
Steps for Adding ISSN Supplement2 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
IssnSup2object and set its parameters. - Add the
IssnSup2object instance to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
IssnSup2 barcode = new IssnSup2("977-1234-56700", "12", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ISSN Supplement5 to PDF
The following steps and C# sample code illustrate adding an ISSN Supplement 5 barcode to a PDF document.
Steps for adding ISSN Supplement5 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
IssnSup5object and set its parameters. - Add the
IssnSup5object to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
IssnSup5 barcode = new IssnSup5("979-0-1234-5678", "12345", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add ITF-14 to PDF
The following steps and C# sample code add a ITF-14 barcode to a PDF document.
Steps for Adding ITF-14 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
Itf14object and set its parameters. - Add the
Itf14object to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Itf14 barcode = new Itf14("1234567890", 50, 50, 48);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Postnet to PDF
The following steps and C# sample code add a Postnet barcode to a PDF document.
Steps for Adding Postnet to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Postnetobject and set its parameters. - Add the
Postnetobject to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Postnet barcode = new Postnet("20815470412", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Intelligent Mail Barcode to PDF
The following steps and C# sample code illustrate adding an Intelligent Mail Barcode to a PDF document.
Steps for Adding Intelligent Mail Barcode to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to the Document instance. - Create a
IntelligentMailBarcodeobject and set its parameters. - Add the
IntelligentMailBarcodeobject to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
IntelligentMailBarCode barcode = new IntelligentMailBarCode("0123456709498765432101234567891", 50, 150);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add MsiBarcode to PDF
The following steps and C# sample code add a MSI barcode to a PDF document.
Steps for adding MSI Barcode to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
MsiBarcodeobject and set its parameters. - Add the
MsiBarcodeinstance to thePageobject. - Save the PDF Document.
Sample code - C#
Document document = new Document();
Page page = new Page();
MsiBarcode barcode = new MsiBarcode("1234567890", 50, 100, 48);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add RM4SCC to PDF
The following steps and C# sample code add a RM4SCC barcode to a PDF document.
Steps for adding RM4SCC to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
Rm4sccobject and set its parameters. - Add the
Rm4sccobject toPageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Rm4scc barcode = new Rm4scc("20815470412", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Singapore Post to PDF
The following steps and C# sample code add a Singapore Post barcode to a PDF document.
Steps for Adding Singapore Post to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
SingaporePostobject and set its parameters. - Add the
SingaporePostobject to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
SingaporePost barcode = new SingaporePost("208154", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Australia Post to PDF
The following steps and C# sample code add a Australia Post barcode to a PDF document.
Steps for Adding Singapore Post to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
AustraliaPostobject and set its parameters. - Add the
AustraliaPostinstance to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
AustraliaPost barcode = new AustraliaPost("1139549554", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Kix barcode to PDF
The following steps and sample illustrate adding a KIX barcode to a PDF document.
Steps for Adding Kix to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to the Document object. - Create a
Kixobject and set its parameters. - Add the
Kixinstance to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Kix barcode = new Kix("1231FZ13XHS", 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add DeutschePostIdentcode to PDF
The following steps and C# sample code add a DeutschePostIdentcode barcode to a PDF document.
Steps for Adding DeutschePostIdentcode to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject instance. - Create a
DeutschePostIdentcodeobject and set its parameters. - Add the
DeutschePostIdentcodeinstance to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
DeutschePostIdentcode barcode = new DeutschePostIdentcode("12345678901", 50, 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add DeutschePostLeitcode to PDF
The following steps and C# sample code illustrate adding a DeutschePostLeitcode barcode to a PDF document.
Steps for Adding DeutschePostLeitcode to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
DeutschePostLeitcodeobject and set its parameters. - Add the
DeutschePostLeitcodeobject to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
DeutschePostLeitcode barcode = new DeutschePostLeitcode("1234567890123", 50, 50, 50);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add Aztec to PDF
The following steps and C# sample code illustrate adding an Aztec barcode to a PDF document.
Steps for Adding Aztec to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Aztecobject and set its parameters. - Add the
Aztecobject instance to thePageobject instance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
Aztec barcode = new Aztec("Hello World", 50, 50, AztecSymbolSize.Full, 5);
page.Elements.Add(barcode);
document.Draw(@"Output.pdf");
How to Add QRCode to PDF
The following steps and C# sample code illustrate adding a QRCode barcode to a PDF document.
Steps for Adding QR Code to a PDF
- Create a
Documentobject. - Create a
Pageobject and add it to theDocumentobject. - Create a
QrCodeobject and set its parameters. - Add the
QrCodeobject instance to thePageobject instance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
QrCode qrCode = new QrCode("QR code sample.", 100, 100);
page.Elements.Add(qrCode);
document.Draw(@"Output.pdf");
How to Add Data Matrix to PDF
The following steps and C# sample code add a Data Matrix barcode to a PDF document.
Steps for Adding DataMatrix to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentobject instance. - Create a
DataMatrixBarcodeobject and set its parameters. - Add the
DataMatrixobject to thePageobject. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
DataMatrixBarcode dataMatrixBarcode = new DataMatrixBarcode("DataMatrix to PDF", 100, 100);
page.Elements.Add(dataMatrixBarcode);
document.Draw(outputPath);
How to Add PDF417 to PDF
The following steps and C# sample code illustrate adding a PDF 417 barcode to a PDF document.
Steps for Adding PDF417 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
Pdf417object and set its parameters. - Add the
Pdf417instance to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
document.Pages.Add( page );
Pdf417 pdf417 = new Pdf417( "Pdf417 to PDF", 10.0f, 10.0f, 2, 2.0f );
page.Elements.Add( pdf417 );
document.Draw(outputPath);
How to Add MacroPdf417 to PDF
The following steps and C# sample code add a Macro PDF 417 barcode to a PDF document.
Steps for Adding Macro PDF417 to a PDF Document
- Create
Documentobject. - Create a
Pageobject and add it to theDocumentinstance. - Create a
MacroPdf417object and set its parameters. - Add the
MacroPdf417instance to thePageinstance. - Save the PDF Document.
Sample Code - C#
Document document = new Document();
Page page = new Page();
document.Pages.Add(page);
MacroPdf417 macroPdf417 = new MacroPdf417("MacroPdf417 to PDF", 10.0f, 10.0f, 3, 2.0f);
page.Elements.Add(macroPdf417);
document.Draw(outputPath);
GitHub Project
An example project is available on GitHub (examples.dynamicpdf-core-suite-dotnet-core). Examples are provided in C# and VB.NET. Clone or view the example project at GitHub. This specific example discussed on this page are all contained in following classes on GitHub
- C# -BarcodeExample.cs
- VB.NET - BarcodeExample.vb
Getting Started
Get started easily by installing DynamicPDF Core Suite for .NET through NuGet or manually. Then, refer to the documentation for more information on using and purchasing the product.
NuGet Package
The easiest way to install DynamicPDF Core Suite is by obtaining the NuGet package using Visual Studio's Package Manager. You can also obtain the NuGet package by downloading it directly. Refer to the installation documentation for more information.
DynamicPDF Core Suite Information
DynamicPDF Core Suite for .NET combines creating, merging, and visual report creation into one powerful product for creating PDF documents. It is ideal for anyone who needs to generate PDF documents or reports or work with existing PDFs in their applications. With a free Evaluation Edition to try and with flexible and royalty-free licensing options, why not start using DynamicPDF Core Suite for .NET today!
For more information on barcodes
- Refer to the Barcodes topic, or
- Chapter 12, Bar Codes, in the book DynamicPDF Core Suite for .NET by Example available on GitHub.
Available on Other Platforms
DynamicPDF Core Suite is also available for the Java and COM/AxtiveX platforms. Refer to the respective product pages for more details.
- DynamicPDF Generator
- Java - DynamicPDF Generator for Java
- COM/ActiveX - DynamicPDF Generator for COM/ActiveX
- DynamicPDF Merger
- Java - DynamicPDF Merger for Java
- COM/ActiveX - DynamicPDF Merger for COM/ActiveX