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

Lynch, Jonathan BNZ2 at CDC.GOV
Fri Jan 7 17:36:46 CST 2005


So...

I just discovered the formattedrect property, which applies to text as
well as to objects. This makes it pretty easy - and I just tested it
with the single line field I was using to compare printed width to
screen width - and it prints nearly perfectly!

-----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 5:45 PM
To: How to use Revolution
Subject: RE: Practically perfect printing - an idea that should work...

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
_______________________________________________
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