0

I'm testing my desktop application to generate barcode in PDF417 format. Where am i going wrong? Every-time i run code and type any text into textbox and when i try to encode the data, it throws an error saying "Unable to fit message in columns" The code works for other formats of Barcode say like DATAMATRIX, QR CODE etc. But for PDF417 it won't work

I am using Zxing Barcode for encoding

Here is my code

  Dim writer As new Barcodewriter
  writer.format = Barcodeformat.PDF_417
  pic.image = writer.write(txtbox.text)



I expect the output to be encoded in PDF417 Image but i get exceptional error as "Unable to fit message into columns"
Ajay s
  • 11
  • 3
  • What version of ZXing.Net do you use? On which target platform (.Net Core, .Net classic, mobile platform, ...? What is the value of txtbox.text? Did you try the WinForms demo application? – Michael Oct 14 '19 at 19:17
  • Hi. I am using Zxing.net 0.16.5 version and Target platform is for Desktop using windows form application VB.NET. Value in txtbox.text is small sentence containing characters and numbers - example: "Following part has non conformance, is out of tolerance by 0.012mm" . Yes i am trying on winforms application . it is working for other barcode formats but not for PDF417 – Ajay s Oct 15 '19 at 05:02
  • I mean did you try the WinForms demo which is provided by the ZXing.Net project: https://github.com/micjahn/ZXing.Net/tree/master/Clients/WindowsFormsDemo – Michael Oct 15 '19 at 19:19
  • Hi, Michael Thanks for the reply. Problem solved. I went through your demo and understood your code and implemented same in my application its working now! Problem was with the image height and width and character length. Now its encoding. Thank you very much for your help. :) – Ajay s Oct 17 '19 at 04:43

0 Answers0