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!
PdfEan13Barcode ean13Code = new PdfEan13Barcode();
ean13Code.Text = "5901234123457";
// works
ean13Code.ToImage();
PdfUnidimensionalBarcode unidimensionalCode = ean13Code;
// doesn't work
unidimensionalCode.ToImage();
throws
System.ArgumentException: Invalid parameter.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at Syncfusion.Pdf.Barcode.PdfUnidimensionalBarcode.ToImage()
I assume this is because PdfEan13Barcode and PdfEan8Barcode declare a virtual ToImage() method
public class PdfEan13Barcode : PdfUnidimensionalBarcode
{
...
public virtual Image ToImage();
...
}
instead of an override ToImage() method to override the base class' virtual method ToImage()
public class PdfUnidimensionalBarcode : PdfBarcode
{
...
public virtual Image ToImage();
...
}