We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

QR code physical dimensions?

Hello everyone.

I would like to generate a PDF file with more pages, each page same (custom) size, and only one QR code per page, filling the entire page.
PDF will be manipulated later, so physical dimension of single code's square is not important - just the size of the rendered QR code.

Is there a way of knowing how big will the generated QR code be on PDF page? 
I tried reading barcode.Size.Width and barcode.Size.Height properties (both before and after barcode.Draw was executed), but I am always getting zeroes.


2 Replies

SB Slobodan Babic May 14, 2017 06:41 PM UTC

I just figured it out.

barcode.Size = new SizeF(100, 100);

will generate QR code of size 100×100, no matter how long the Text is, or what you do with XDimension and PdfErrorCorrectionLevel.
Of course, individual squares generated will be smaller as Text gets longer…

Did not want to delete thread - may be useful for someone else.

GR Gayathri Ramalingam Syncfusion Team May 15, 2017 12:13 PM UTC

Hi Slobodan, 
Thank you for using Syncfusion product. 
Please find the details of your queries in the below table, 
Is there a way of knowing how big will the generated QR code be on PDF page?  
I tried reading barcode.Size.Width and barcode.Size.Height properties (both before and after barcode.Draw was executed), but I am always getting zeroes. 
Currently we do not have support to getting size of the QRBarcode in Xamarin.Forms, we will consider this usability feature request. We will implement this feature and it will be included in our Volume 2, SP 1 release which is expected to be available at the end of May, 2017.   We request you to visit our website periodically for feature related updates.  
what you do with XDimension andPdfErrorCorrectionLevel. 
Specifies the width of the narrowest element(bar or space) in a barcode. The greater the x dimension, the more easily a barcode reader will scan. 
Error Correction Level: 
There are 4 error correction levels used for QR codes, with each one adding different amounts of “backup” data depending on how much damage the QR code is expected to suffer in its intended environment, and hence how much error correction may be required: 
  • Level L – up to 7% damage
  • Level M – up to 15% damage
  • Level Q – up to 25% damage
  • Level H – up to 30% damage
Please find the below link for more details about Error correction level, 
Please let us know if you need further assistance on this. 
With Regards, 
Gayathri R 

Live Chat Icon For mobile
Up arrow icon