I created a barcode as an image in my ASP.NET MVC app.
BarcodeLib.Barcode barcode = new BarcodeLib.Barcode()
{
IncludeLabel = false,
Alignment = AlignmentPositions.LEFT,
Width = element.BarcodeWidth,
Height = element.BarcodeHeight,
RotateFlipType = RotateFlipType.RotateNoneFlipNone,
BackColor = Color.Transparent,
ForeColor = Color.Black,
ImageFormat = System.Drawing.Imaging.ImageFormat.Png
};
This will create a barcode with the BarcodeLib.
How do I convert it to an XImage of PDFsharp?
Image img = barcode.Encode(TYPE.CODE128, "123456789");
gfx.DrawImage(xImage, 0, 0, 100, 100);