Category / Section
How to scale the QR Code?
1 min read
The QR barcode can be scaled by setting the XDimension property of the PdfQRBarcode class. The following code example is for scaling QR Code.
C#
//Loads the pdf PdfLoadedDocument pdfDoc = new PdfLoadedDocument("sample.pdf"); //create the barcode PdfQRBarcode qrCode = new PdfQRBarcode(); qrCode.Text = "Ac-42"; //Set dimension to scale the barcode qrCode.XDimension = 10; //Draw the Barcode qrCode.Draw(pdfDoc.Pages[0], new PointF(10, 10)); //Save the File pdfDoc.Save("Output.pdf"); pdfDoc.Close();
Sample Link:
https://www.syncfusion.com/downloads/support/directtrac/general/QRCode911548536.zip