Hi,

This is more a 'please advise question', on how to attack a particular problem:

I'm printing (hardcopy) using Win32::Printer. it all works OK except formatting. I'm this case I'm printing the message and address of a picture postcard. I have the address lines in one array and the message text (having a lovely time, weather fine etc) in another.

My problem is that as the message lines are different for each message, and the font type is also changing and NOT fixed width. When I join the appropriate message and address lines, the address 'column' 'wobbles' top to bottom, due to the variations in letter width from the true type fonts (TTF) in the message.

I have tried 'pack' ing out the address lines and various sprintf horrors, but the varying character widths mess it up every time. I recon I can fix this with tabs, but its going to get very messy...

Sooo..., can any monks off up any ideas on how to format this to allow for TTF, in a more elegant way???



Thanks

Eadmund

In reply to Formatting Printed column output with variable width Fonts by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.