ByteScout BarCode Generator SDK - VB.NET - Store Large Data with Macro PDF417 Barcode - ByteScout

ByteScout BarCode Generator SDK – VB.NET – Store Large Data with Macro PDF417 Barcode

  • Home
  • /
  • Articles
  • /
  • ByteScout BarCode Generator SDK – VB.NET – Store Large Data with Macro PDF417 Barcode

store large data with macro pdf417 barcode in VB.NET and ByteScout Barcode SDK

ByteScout Barcode SDK is the robost library (Software Development Kit) that is designed for automatic generation of high-quality barcodes for printing, electronic documents and pdf. All popular barcode types are supported from Code 39 and Code 129 to QR Code, UPC, GS1, GS-128, Datamatrix, PDF417, Maxicode and many others. Provides support for full customization of fonts, colors, output and printing sizes. Special tools are included to verify output quality and printing quality. Can add generated barcode into new or existing documents, images and PDF.

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

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

CreateBarcode.VS2005.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{C5923180-C9F5-4116-AF72-A9E40DB13F42}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>Sub Main</StartupObject> <RootNamespace>CreateBarcode</RootNamespace> <AssemblyName>CreateBarcode</AssemblyName> <MyType>Console</MyType> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>CreateBarcode.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>CreateBarcode.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.BarCode, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>c:\Program Files\Bytescout BarCode Generator SDK\net2.00\Bytescout.BarCode.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> </ItemGroup> <ItemGroup> <Compile Include="Module1.vb" /> </ItemGroup> <ItemGroup> <Content Include="InputData.txt"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>

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

CreateBarcode.VS2008.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{C5923180-C9F5-4116-AF72-A9E40DB13F42}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>Sub Main</StartupObject> <RootNamespace>CreateBarcode</RootNamespace> <AssemblyName>CreateBarcode</AssemblyName> <MyType>Console</MyType> <OldToolsVersion>2.0</OldToolsVersion> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>CreateBarcode.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>CreateBarcode.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.BarCode, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>c:\Program Files\Bytescout BarCode Generator SDK\net2.00\Bytescout.BarCode.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> </ItemGroup> <ItemGroup> <Compile Include="Module1.vb" /> </ItemGroup> <ItemGroup> <Content Include="InputData.txt"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>

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

CreateBarcode.VS2010.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{C5923180-C9F5-4116-AF72-A9E40DB13F42}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>Sub Main</StartupObject> <RootNamespace>CreateBarcode</RootNamespace> <AssemblyName>CreateBarcode</AssemblyName> <MyType>Console</MyType> <OldToolsVersion>3.5</OldToolsVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>CreateBarcode.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>CreateBarcode.xml</DocumentationFile> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.BarCode, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>c:\Program Files\Bytescout BarCode Generator SDK\net2.00\Bytescout.BarCode.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> </ItemGroup> <ItemGroup> <Compile Include="Module1.vb" /> </ItemGroup> <ItemGroup> <Content Include="InputData.txt"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>

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

InputData.txt
      
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer bibendum auctor sem, sollicitudin facilisis purus interdum eu. Mauris nec quam eu lectus pretium commodo. Vestibulum porttitor dignissim leo et dictum. Pellentesque a felis at purus gravida pulvinar at at urna. Praesent ornare pretium nisi ut vestibulum. Nullam tincidunt accumsan enim vel facilisis. Morbi sed nisi sit amet purus consequat laoreet. Nunc sed nisl sed nisl convallis vestibulum. Vivamus consectetur in tortor eu rhoncus. Aenean ut lacinia erat. Duis tristique eget risus a imperdiet. Nunc mattis placerat leo. Nam sit amet hendrerit lectus. Proin varius posuere velit, eu faucibus turpis accumsan sed. Suspendisse sagittis posuere orci, eget cursus ligula sodales eget. Vivamus vel lorem at odio lacinia dignissim. Phasellus aliquet pulvinar sem molestie iaculis. Nam maximus nunc at venenatis malesuada. Suspendisse eget mi odio. Aliquam non erat euismod, laoreet nulla at, vehicula quam. Nullam non bibendum lectus. Cras vulputate sem leo. Pellentesque enim libero, faucibus a tempus vitae, pulvinar eget nulla. Nunc eros est, placerat non luctus et, gravida ac nisi. Etiam ullamcorper sapien elit, in lacinia erat pretium eu. Duis enim dolor, sollicitudin tristique velit eu, ullamcorper dictum odio. Curabitur vel lobortis tellus, eget lacinia tellus. Sed et elit a dolor consequat scelerisque in ac ante. Integer lorem velit, aliquet a turpis pulvinar, dapibus lobortis dolor. Morbi ut molestie nulla. Nunc massa sem, lobortis dignissim diam et, mollis laoreet magna. Nunc dictum lacinia gravida. Fusce massa risus, semper sodales posuere eu, interdum non augue. Praesent pharetra ante eget turpis luctus accumsan. Ut rhoncus nisl justo, ac luctus purus hendrerit nec. Nam aliquet lobortis nunc sed iaculis. Proin eget quam ligula. In dictum lacus id sem egestas consequat. Mauris vel mi lorem. Proin sodales pellentesque neque, vitae placerat urna condimentum quis. Integer quis sodales nibh, non euismod odio. Nullam placerat ex nisl, nec bibendum lectus consequat eu. Vivamus eu mauris placerat, commodo tortor non, efficitur justo. Nullam ac aliquet orci. Phasellus metus elit, dignissim vitae odio id, vehicula eleifend velit. Suspendisse dui mauris, dignissim ac venenatis non, viverra ac dui. Morbi volutpat dui diam, at sodales ante dictum eu. Pellentesque ut turpis et lacus placerat ullamcorper. In hac habitasse platea dictumst. Nunc ligula eros, efficitur sit amet blandit sed, efficitur eu velit. Etiam ut dui risus. Praesent cursus, nunc ut tempus dictum, orci neque pellentesque nibh, vel ultricies urna sapien in lorem. Quisque hendrerit, diam non condimentum volutpat, eros odio hendrerit tellus, ut pretium odio augue vel leo. Donec sit amet convallis eros. Duis viverra tellus ac leo volutpat, a porttitor dui hendrerit. Nam mattis efficitur turpis non dictum. Fusce et ipsum vitae mi ultricies sollicitudin non nec orci. Mauris tempor dui a mi lacinia, vestibulum sagittis erat lacinia. Vivamus eu lobortis est, eget semper augue. Quisque elementum efficitur enim. Aenean cursus laoreet ipsum at accumsan. Morbi a ligula ante. Etiam ut tempus nisl. Ut volutpat fermentum consectetur. Quisque libero lacus, tincidunt eget massa sit amet, pharetra porta dolor. Ut dapibus nibh ac erat semper, a efficitur leo varius. Duis nec consequat sapien. Donec sed vulputate lorem. Proin sed velit arcu. Etiam sit amet cursus augue. Sed tristique nisl vel sagittis mollis. Vivamus accumsan eget ante ut placerat. Curabitur at ullamcorper risus, in finibus ipsum. Phasellus posuere facilisis ligula vitae interdum. Pellentesque sagittis dignissim urna, eget consequat sem venenatis et. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nunc libero purus, tincidunt et volutpat quis, tempor ut nisl. Nunc mollis convallis ex, pellentesque rhoncus tortor molestie at. Donec lacinia porttitor neque, et laoreet nunc consectetur id. Nam ullamcorper lectus sodales nibh aliquet suscipit gravida id nisi. Duis non aliquet odio. Sed fermentum nisi sed est interdum, vel sollicitudin augue semper. Morbi sit amet nunc mauris. Fusce eleifend posuere ligula vel aliquet. In pulvinar eros eget lobortis imperdiet. Nunc a dolor volutpat, congue arcu vitae, pharetra dui. Maecenas tempor feugiat imperdiet. Nulla ut sem quis odio cursus rhoncus. Sed sed consectetur nunc, at tincidunt velit. Morbi id enim pulvinar, sollicitudin sapien sed, lobortis ante. Pellentesque quis venenatis turpis. Praesent sem nibh, placerat a augue non, congue placerat neque. Aliquam sed venenatis odio. Aenean consequat non odio a fringilla. Donec cursus nisi ipsum. Cras malesuada eget nulla vitae tincidunt. Proin mollis tortor sapien, venenatis euismod odio dictum nec. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Aenean eget cursus nulla. Etiam semper posuere ante, in consectetur nisi ultricies sed. Fusce diam tortor, finibus ultricies dolor a, varius bibendum quam. Vivamus elementum leo ut nunc vulputate, vehicula imperdiet orci pulvinar. Fusce suscipit, lacus sed lobortis ornare, ex lacus interdum enim, id fringilla est quam porttitor nisl. Nunc dictum elit condimentum massa consectetur tincidunt. Nam tincidunt ipsum sem, id elementum turpis mollis id. Sed tempor nisl eget est convallis imperdiet. Praesent vitae magna orci. Sed consectetur non sapien ut euismod. Ut at lacinia arcu. Vivamus vitae orci lectus. Etiam ultrices id quam a faucibus. Aenean porttitor varius libero ac suscipit. Donec iaculis purus nulla, congue semper nisi varius id. Duis bibendum vehicula lorem, in condimentum nisl ultrices at. Aenean maximus, orci dapibus convallis facilisis, nulla ipsum dapibus libero, sed viverra turpis dolor nec ex. Praesent mattis erat diam, vel porta dui pulvinar a. In mollis, odio sit amet ultrices commodo, enim metus pharetra tortor, a mollis lectus turpis tempor neque. Donec tincidunt felis ac nibh dapibus gravida. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut malesuada pretium nulla, vel blandit sem cursus vel. Quisque id eros nec erat ultricies fringilla quis a eros. Vestibulum nisl ipsum, condimentum a mi vitae, pharetra tincidunt dolor. Aliquam in bibendum odio, ut vehicula lorem. Nunc rhoncus, metus sed porttitor mattis, erat augue dignissim lorem, quis porta enim erat vel nulla. Cras vitae semper nisl. Nunc mauris magna, elementum in nibh at, commodo condimentum dolor. In dui nibh, venenatis sit amet elit at, volutpat scelerisque felis. In viverra erat vitae ligula viverra pellentesque id ac lectus. Sed sed risus eleifend, posuere orci in, elementum libero. Integer ac placerat ante. Pellentesque ut sem at felis ornare interdum non eu sapien. Donec laoreet id sem eget commodo. Duis sapien dolor, lacinia sed ex sed, tristique consequat dui.

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

Module1.vb
      
Imports System.Drawing Imports System.Linq Imports Bytescout.BarCode Module Module1 Sub Main() ' Load text file Dim textInput As String = System.IO.File.ReadAllText("InputData.txt") ' Split text into chunks Dim lstChunks = textInput.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries) ' Create new barcode Using barcode As New Barcode("demo", "demo") ' Keep generated barcode images in the list Dim images As New List(Of Image)() ' Select Macro PDF417 barcode type barcode.Symbology = SymbologyType.MacroPDF417 Dim macro417SegmentHelper As Macro417SegmentHelper = New Macro417SegmentHelper() macro417SegmentHelper.AddValue(lstChunks) ' Set FileID. ' FileID Is a number from 0 to 899. It must be same for all barcodes in the set. barcode.Options.PDF417FileID = 123 Dim ctr = 0 Dim resImgName = "" For Each itmSegment As Macro417Segment In macro417SegmentHelper.GetAllSegments() ' create the first segment barcode so set SegmentIndex = 1 barcode.Options.PDF417SegmentIndex = itmSegment.SegmentIndex ' Set value barcode.Value = itmSegment.SegmentValue ' set that this Is Not the last segment yet barcode.Options.PDF417LastSegment = itmSegment.IsLastSegment ' Save barcode to image ctr = ctr + 1 resImgName = {code}quot;img{ctr}.png" barcode.SaveImage(resImgName, Imaging.ImageFormat.Png) Console.WriteLine("'{0}' generated!", resImgName) Next End Using Console.ReadLine() End Sub Public Class Macro417SegmentHelper ' Declarations Private Property lstValues As List(Of String) = New List(Of String)() ' Add segment value Public Sub AddValue(ParamArray strValue As String()) Me.AddValue(strValue.ToList) End Sub Public Sub AddValue(ByVal strValue As List(Of String)) For Each item As String In strValue lstValues.Add(item) Next End Sub ' Get all segment value Public Function GetAllSegments() As List(Of Macro417Segment) Dim lstRet = New List(Of Macro417Segment)() For i As Integer = 0 To lstValues.Count - 1 Dim oSegment = New Macro417Segment With { .SegmentValue = lstValues(i), .SegmentIndex = i + 1, .IsLastSegment = ((i + 1) = lstValues.Count) } lstRet.Add(oSegment) Next Return lstRet End Function End Class Public Class Macro417Segment Public Property SegmentValue As String Public Property SegmentIndex As Integer Public Property IsLastSegment As Boolean End Class End Module

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