[reportlab-users] Drawing QRcode

Tim Roberts timr at probo.com
Wed Aug 27 13:54:47 EDT 2014


Vaibhav Gajengi wrote:
>
> I tried using that but its not giving me the result.
> Can you explain me which info should i give for size of widget ?
> I tried with by giving the parameters as below. but i am not getting
> the exact use of this parameters.
>
> Below is the code part 
> qrw = QrCodeWidget(item,barHeight=10*mm,barWidth=10*mm,barBorder=6)
> Can you explain the above paramters ?

I don't think you should specify ANYTHING in the QrCodeWidget
constructor, because you don't know what the parameters do.  You can go
look at the code, if you want, but I don't think it will help.

Just let the widget generate the code in whatever size makes it
comfortable.  For the sample I gave, it ends up being just over one inch
square.

Then, resize it to your desired size when you place it into a Drawing. 
That's the canonical way to use this widget.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list