[reportlab-users] QR Codes

Robin Becker robin at reportlab.com
Wed Sep 15 11:10:27 EDT 2010


On 15/09/2010 14:05, Germán M. Bravo wrote:
........

> Also, I was wondering about those white borders in-between the squares (same happens with regular barcodes) ...when we had the strokes on, those were covered when you zoomed in, but strokes messed up the printed version... I'm not sure, you think there could be an issue somewhere in the primitives for the PDF canvas? if you try with other primitives for other devices, does it have the same effect of leaving those tiny white borders? I saw ReportLab can print to other things other than PDF, but I haven't gotten into that yet... and the math in the barcodes (QR as well) seems okay, so I was wondering if there's a bug somewhere or something.

.......


This problem is caused by our renderPM back end attempting to draw in between
the pixels. The attached shows the effects of drawing 7 pixel rectangles
starting at x=10 or 10.5 with the latter showing the problem in gif land, but
not in pdf.

The intent was that modulo pixel dpi scaling the gif should match the pdf
exactly which it does, but because we can't draw properly between the pixels
anti-aliasing is used to simulate the missing areas resulting in grey ends and
hence the artefactual grids. If we wanted to do this web thing properly I'd need
to get inside the QR drawing code and ensure all the drawn rectangles were
integer sized and started at integer coordinates. Then we wouldn't see this
effect. I'm not expert enough with this code to know if that's easy.
--
Robin Becker
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tqrprob.py
Url: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20100915/0bc3f28a/attachment.ksh>


More information about the reportlab-users mailing list