Question How to change barcode width in XFinium.PDF?

Dev Think

Member
Joined
Jun 23, 2021
Messages
6
Programming Experience
1-3
i am using XFinium package for generate pdf, but i have tried for change width and height of barcode, but it does not set width of barcode
show Error
Error CS0200 Property or indexer 'PdfBarcode.Width' cannot be assigned to -- it is read only

DrawPDF:
public void DrawPDF(PdfGraphics g)
{
    PdfCode128Barcode abc = new PdfCode128Barcode();
    abc.Data = DataToEncode;
    abc.BarcodeTextPosition = PdfBarcodeTextPosition.None;
    
    abc.Width = 10.2;
    g.DrawBarcode(abc, PosX, PosY);
}
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
4,431
Location
Chesapeake, VA
Programming Experience
10+
Top Bottom