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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

When the default bar height (80 pt) is used, the barcode is drawn with a bar height of 65.752 pt. After the barcode is drawn, the bar height is now 65.752 pt and the barcode.Size.Height is updated to 80 pt. I would expect the bar height of the drawn barcode to be 80 pt and not be updated by calling the Draw function.

Possibly related to 

        static void ShowPdfBarcodeDrawDefaultBug()

        {

            PdfDocument document = new PdfDocument();

            document.PageSettings.SetMargins(0f);

            List barcodes = new List

            {

                new PdfCode39Barcode("1234567890") ,

                new PdfCode11Barcode("1234567890"),

                new PdfCodabarBarcode("1234567890"),

                new PdfCode32Barcode("12345678"),

                new PdfCode93Barcode("1234567890"),

                new PdfCode128ABarcode("1234567890"),

                new PdfCode128BBarcode("1234567890"),

                new PdfCode128CBarcode("1234567890"),

            };

            foreach (PdfUnidimensionalBarcode barcode in barcodes)

            {

                barcode.BackColor = new PdfColor(Color.WhiteSmoke);

                Console.WriteLine(barcode.GetType().Name);

                Console.WriteLine($"Bar height: {barcode.BarHeight}"); // 80

                Console.WriteLine($"Size: {barcode.Size}"); // Height: 94.248

                PdfPage pagePreResize = document.Pages.Add();

                barcode.Draw(pagePreResize);

                Console.WriteLine($"Bar height: {barcode.BarHeight}"); // 65.752

                Console.WriteLine($"Size: {barcode.Size}{Environment.NewLine}"); // Height: 80

            }

            document.Save($"{System.Reflection.MethodBase.GetCurrentMethod().Name}.pdf");

            document.Close();

        }