Articles in this section
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

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied