Practically perfect printing - an idea that should work...

Lynch, Jonathan BNZ2 at CDC.GOV
Fri Jan 7 15:32:44 EST 2005


My apologies if I am annoying everyone by obsessing over printing
issues. I tend to fixate on solving problems sometimes...

Here is an idea that should work - don't know if I will bother actually
scripting it, because it sounds rather difficult - but certainly would
be within the range of what would be considered doable.

The printing script would do the following:

1) create a new stack

2) copy over each card that is to be printed to that stack

3) set the properties of the new stack to be equal to the properties of
the original stack

4) replace each field in the stack with a group that contains an image
with the same properties as the field (same border, same bgcolor,
etc...)

5) for each character, do the following:

     a) determine the x,y position of that character relative to the
left and top of the field

     b) create a borderless field (with a wee bit of margin) that
contains only that character, with the same formatting as the character
had in the original field

     c) place the single-character field on top of the image, positioned
so that the character is in the exact same x,y location as it was in the
original field

6) Print the new stack


Done like this - if a print character is larger than the screen
character, it will expand into the margins of the single-character field
that contains it - however, it will not change the width or height of a
line. Thus, when a card is printed, its layout will be virtually
identical.

What do you guys think - would it work?


More information about the Use-livecode mailing list