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

Lynch, Jonathan BNZ2 at CDC.GOV
Fri Jan 7 17:44:49 EST 2005


So, maybe I will write this script...

I just did a quick test of this idea, using a single-line field, and the
positioning of the letters when printed is excellent! 

Does anyone have a suggestion on how to determine the exact x,y position
of a character within a field? I guess it could be done by adding up
formattedheights and formattedwidths of characters, and all that - but
it sounds slow and painful to write. Is there a quick way to get the x,y
coordinates of a character?

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Lynch,
Jonathan
Sent: Friday, January 07, 2005 3:33 PM
To: How to use Revolution
Subject: Practically perfect printing - an idea that should work...

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?
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


More information about the use-livecode mailing list