Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I have tested this property on all PdfUnidimensionalBarcodes and noticed that the 128C Barcode encodes the wrong message. The expected message in 128C was 12 34 56 78 90 but was 49 50 51 52 53 54 55 56 57 48
PdfDocument document = new PdfDocument();
document.PageSettings.SetMargins(0f);
PdfCode128CBarcode barcode = new PdfCode128CBarcode("1234567890");
// set bar width to 1. this achieves 2 things
// 1. the bar width is not calculated and thus
// both barcodes have the same bar width
// making it easier to compare them
// 2. setting it to 1 makes them easier to read
// with the ruler in Adobe Acrobat Reader DC
// to decode them by hand
barcode.NarrowBarWidth = 1;
// needs to be set, so the bar width is not
// calculated
barcode.BarHeight = 40;
barcode.EnableCheckDigit = true;
PdfPage page = document.Pages.Add();
// encodes the following message HEX (128C):
// 0x63 (Start C) | 0x0c (12) | 0x22 (34) | 0x38 (56) | 0x4e (78) | 0x5a (90) | 0x55 (85) | 0x6a (Stop)
barcode.Draw(page);
barcode.EnableCheckDigit = false;
// encodes the following message HEX (128C):
// 0x63 (Start C) | 0x31 (49) | 0x32 (50) | 0x33 (51) | 0x34 (52) | 0x35 (53) | 0x36 (54) | 0x37 (55) | 0x38 (56) | 0x39 (57) | 0x30 (48) | 0x6a (Stop)
barcode.Draw(page, new PointF(0, barcode.Size.Height));
document.Save($"{System.Reflection.MethodBase.GetCurrentMethod().Name}.pdf");
document.Close();