[reportlab-users] Fonts / positioning different on Windows vs Linux

Mike Driscoll mike at pythonlibrary.org
Wed Jan 8 16:38:13 EST 2014


Hi,

I was wondering why the standard font is different on Linux versus Windows.
Also, I noticed that the actual positioning of the text / elements are
slightly different. The latter may be partially a function of the font
difference, although I'm not sure of that.

Anyway, I created a simple example where I have a barcode and an address
underneath it. You'll notice that the first line of the address is slightly
closer to the barcode when the code is run on Linux versus when it's run on
Windows.

This might not seem like a big deal, but I discovered that it matters when
you are trying to position MICR marks on a check...I would get it working
on one OS to find out it was broken on another. And I've had code where it
will look great on Windows, then when I run it on Linux, the first line of
the address is buried in the barcode.

I am testing on CentOS and Windows 7.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140108/f04031e0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_linux.pdf
Type: application/pdf
Size: 2527 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140108/f04031e0/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdf_test.py
Type: text/x-python
Size: 833 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140108/f04031e0/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_win.pdf
Type: application/pdf
Size: 2378 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20140108/f04031e0/attachment-0001.pdf>


More information about the reportlab-users mailing list