Question How to change barcode width in XFinium.PDF?

Dev Think

Member
Joined
Jun 23, 2021
Messages
15
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);
}
 
Back
Top Bottom