A simple way to generate PDF417 barcode

Posted by Godsky under C# on 12/23/2012 | Points: 10 | Views : 5725 | Status : [Member] | Replies : 8
Before starting the programming, please download the PDF417EncodeSDK/NET from Aipsys.com

1. Constants

1.1. Encoding

PDF_BINARY = 0;
PDF_TEXT = 1;
PDF_NUMERIC = 2;

1.2. Error correction Level
1~8

2. Class and description
public ImageEncoder()
public System.Drawing.Bitmap Encode2Image()
public bool Encode2ImageFile(string filename)
public bool RegisterPDF417Encoder(string strMail, string strRegCode)

public System.Drawing.Color BackgroundColor { set; get; }
public int BarHeight { set; get; }
public int BarWidth { set; get; }
public int Columns { set; get; }
public bool Compact { set; get; }
public int Encoding { set; get; }
public int ErrorCorrectionLevel { set; get; }
public System.Drawing.Color ForegroundColor { set; get; }
public string MacroAddresse { set; get; }
public int[] MacroFileId { set; get; }
public string MacroFileName { set; get; }
public long MacroFileSize { set; get; }
public bool MacroLastSegment { set; get; }
public int MacroSegment { set; get; }
public int MacroSegmentCount { set; get; }
public string MacroSender { set; get; }
public string MacroTimeStamp { set; get; }
public int Margin { set; get; }
public int Resolution { set; get; }
public int Rows { set; get; }
public string TextData { set; get; }


3. Samples
3.1. Encode to image
ImageEncoder bc = new ImageEncoder();
bc.TextData="http://www.aipsys.com";
bc.Resolution = 1;
bc.Compact = false;
bc.Margin = 20;
bc.ErrorCorrectionLevel=2;
bc.Encoding=ImageEncoder.PDF_BINARY ;
bc.Columns=3;
bc.Rows=3;
bc.BarHeight = 6;
bc.BarWidth = 4;
bc.BackgroundColor = Color.White;
bc.ForegroundColor = Color.Black;
pictureBox1.Image = bc.Encode2Image();

3.2. Encode to image file
ImageEncoder bc = new ImageEncoder();
bc.TextData="http://www.aipsys.com";
bc.Resolution = 1;
bc.Compact = false;
bc.Margin = 20;
bc.ErrorCorrectionLevel=2;
bc.Encoding=ImageEncoder.PDF_BINARY ;
bc.Columns=3;
bc.Rows=3;
bc.BarHeight = 6;
bc.BarWidth = 4;
bc.BackgroundColor = Color.White;
bc.ForegroundColor = Color.Black;
bc.Encode2ImageFile("c:\\pdf417Test.gif");




Responses

Posted by: Adelali on: 12/29/2012 [Member] Starter | Points: 25

Up
0
Down
Helpful!!!
And I find another way of pdf417 generator vb.net.(http://www.businessrefinery.com/products/barcode_net_win/pdf_417.html)
It's also easy and efficent . Share it with all of you.

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Adelali on: 12/29/2012 [Member] Starter | Points: 25

Up
0
Down
Helpful!!!
And I find another way of pdf417 generator vb.net.http://www.businessrefinery.com/products/barcode_net_win/pdf_417.html
It's also easy and efficent . Share it with all of you.

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Erfsfgserse on: 1/9/2013 [Member] Starter | Points: 25

Up
0
Down
That's good. I also want to share with you what I am using now. I am using a Java PDF417 barcode generator which provides detailed guide(http://www.onbarcode.com/products/java_barcode/barcodes/pdf417.html ). It's also good and efficient.

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Camillem on: 6/20/2013 [Member] Starter | Points: 25

Up
0
Down
What I have experienced is C# PDF417 barcode generating guide
more tutorails can be found by http://www.rasteredge.com/how-to/csharp-imaging/barcode-generating-pdf417/
REImage reImage = REFile.OpenImageFile("c:/Sample.png", new PNGDecoder());


PDF417 barcode = new PDF417();//create a pdf417 barcode
barcode.Data = "123456789";//set barcode data
barcode.X = 2.0F;// set bar width
barcode.XtoYRatio = 0.5F;// the ratio of bar width to bar height
barcode.Resolution = 96;//set barcode printing resolution
barcode.Rotate = Rotate.Rotate0;//set rotate

barcode.DrawBarcode(reImage, 0, 0);//draw barcode on REImage with location x and y

REFile.SaveImageFile(reImage, "c:/pdf417.png", new PNGEncoder());


look for help

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mariah on: 7/23/2013 [Member] Starter | Points: 25

Up
0
Down
as for this question,you may take a look at this website I've searched on google.http://www.keepautomation.com/online_barcode_generator/pdf_417/[/url]

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Caryflores on: 7/31/2013 [Member] Starter | Points: 25

Up
0
Down
Thanks for sharing. It will be much better If you can make a comparision between yours and other PDF 417 barcode generators.

http://www.barcodelib.com/csharp/barcode_symbologies/pdf417.html

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bobchill on: 8/28/2013 [Member] Starter | Points: 25

Up
0
Down
hello, I saw many members shared useful information,
I also want to share a source about PDF417 barcode for all of you, [url]http://www.keepautomation.com/pdf_417/[/url], it is my favorite one, and I think it is very useful, maybe you can find what you really want here, hope you like it.
best regards!

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Makaveiljojo on: 12/16/2013 [Member] Starter | Points: 25

Up
0
Down
Thanks for sharing. For now I'm using a PDF-417 generator to get barcode images in crystal report, and it's easy to do so. You may take a look.
http://www.keepautomation.com/products/net_barcode_crystal_reports/barcodes/pdf_417.html

Godsky, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response