*does a little sourcediving*
I found a comment Should add code here to check width of test ... I'm assuming the author meant "text". Then again, using PDF::Create isn't the best rendering engine.
As I see it, you've got a few options:
- Convert to using PDF::Template. If you choose this, let me know and I'll create some templates to ease your conversion process. The benefit here is that P::T will do text wrapping for you.
- Create wider labels. When you call PDF::Labels->new(), you pass in a pageformat option. Choose one with a wider text area. $PDF::Labels::PageFormats[1] looks to be the widest one (if I'm reading the parameters correctly).
- Accept the fact your labels are truncated. This is the simplest, if least satisfying, option.
I would strongly recommend not attempting to fix the code. Text-width calculations are very difficult. PDF::Template doesn't attempt to do it, instead choosing to delegate to PDFlib. PDF::Create, the rendering engine for PDF::Labels, has a very limited facility for this, which PDF::Labels doesn't even seem to be using.
Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.