Closed Rapid1898-code closed 2 years ago
When I run your example code (after fixing the ;
on line 4), I get a PDF containing little over a page of labels, all with size 10 font. Here's the second page:
(The first page is similar.) I did have to swap in Helvetica for Arial, but I'd be surprised if that made a difference. Also, the border radius may be cutting off the corners.
Yes you are right - i tried this today on another computer and now it seems to work - will test this in the evening on my previous pc.
A side question by that way - is it possible to make a line-break when assigning a text with add_label Tried it with
sheet.add_label("Hello\nsecondline\nthirdline")
But with that i only get this output: [
](url)
For multi-line labels, I believe you have to draw each line as a separate string, incrementing a vertical offset as you draw each line. See https://github.com/bcbnz/pylabels/issues/20#issuecomment-720211465 for an example. (I would be happy to learn if there is a simpler way to do this!)
Thanks this works perfect! Maybe a last simple questions - is it also possible to set a font to bold somehow?
It seems like appending -Bold
to the font name does the trick, e.g. fontName="Helvetica-Bold"
.
Yes - also that worked perfectly! - Thanks a lot for your help!
I tried the basic exampole and want to change the font-size to 10 with the following code -
But this seems not to work -
It seems that the font-sitze is still set to 40 with very big letters. What am i doing wrong?