Page 1 of 2
Text Fields Dont align
Posted: Tue Nov 04, 2008 11:18 am
by wee wullie
I've just started having problems with the alignment of most of the text fields on my printable forms, everything was fine until i upgraded to 2.9 and now its all gone wierd, my app is a report/certificate generator, it has one form for filling in via text fields, combo boxes and list fields etc and it has two printable forms which are the report and certificate, however, when i print them the fields are not aligned properly as they are prior to printing, any suggestions?
Posted: Tue Nov 04, 2008 1:57 pm
by Janschenkel
Is this on Windows? Because on Windows, you have to take the 'formatForPrinting' stack property into account to compensate for the OS-level differences between on-screen fonts and printer fonts.
Jan Schenkel.
format for printing
Posted: Wed Nov 05, 2008 1:17 am
by wee wullie
Hi Jan, thanks for the reply, this problem happens whether format for printing is enabled or not, infact it seems to work slightly better when its disabled, i cant center the fields properly, this is probably not helped by the fact that the fields can contain varying amounts of characters depending on the selections made on the filling in section of the app, the fields that are worst affected are the ones using bold text, its strange!!!
Willie
Posted: Wed Nov 05, 2008 1:26 am
by Mark
Hi Willie,
How exactly do you align text? You can't use spaces to align text, because it will be different on different platforms and sometimes even on different versions of the same operating system and possibly even in different versions of Revolution.
I believe that the text rendering mechanism has change since 2.9, which may explain the problems you are having, especially of you are using older fonts.
Best,
Mark
spaces?
Posted: Wed Nov 05, 2008 10:07 am
by wee wullie
Hi Mark,
my two printable forms contain approximatly 17 - 20-ish fields with labels for each field plus about 8-10 more labels per form, i'm using tahoma for fonts, the fields are in bold, two or three fields have a text size of 12 or 14 with the rest using the smallest text size (9), i tried changing them to veranda and then ariel unicode but it made no difference, on some parts, you still only see part of your text, even if you stretch the fields and labels across the form and by the way, if i enable format for print, half of the fields and labels shift about an inch to the left of the form and it is extremely difficult to align it all and as i said, it looks and aligns better with it disabled, i dont get it.
I think you might be right about the change in text formatting with rev 2.9, i've been using 2.7.4 up until now without any problems.
willie.
Posted: Wed Nov 05, 2008 10:14 am
by Mark
Hi Willie,
Are you sure that your label fields are not covered by other objects?
What happens if you copy such a field to a new, clean stack? Does it change anything?
Best,
Mark
i'll try
Posted: Wed Nov 05, 2008 10:43 am
by wee wullie
Hi Mark,
I'll give that a try, i was also going to try using a fresh set of fields and labels on one of the forms but i'll try that first.
no change
Posted: Wed Nov 05, 2008 12:09 pm
by wee wullie
No joy, its still the same, i'll try replacing the fields and labels on one of the forms and see how it goes, if that works i'll do the same with the other form, failling that, i'll re-do the whole app in rev 2.7.4 as i'm finding 2.9 a little buggy for this particular app, i'm getting a fair amount of rev crashes, it has crashed about a dozen times since i installed it and as i said, i had no problems at all with 2.7.4.
kindest regards,
Willie.
Posted: Wed Nov 05, 2008 1:27 pm
by Mark
Willie,
Did you copy the fields to a new stack? What exactly happened?
Mark
just the same
Posted: Thu Nov 06, 2008 12:50 am
by wee wullie
Mark,
I tried copying my fields over to a new stack and they behaved exactly the same, however, i did uncheck the 'share text' and 'lock text' boxes to see what would happen and it looks a lot better, i'll try messing about with it some more.
Cheers,
Willie.
cant change scale
Posted: Thu Nov 06, 2008 2:20 am
by wee wullie
I think these problems may be down to/not helped by the print scale, i dont seem to be able to change the print scale, i'm using the open printing with dialog command i.e.
Code: Select all
open printing with dialog
set printpapersize to 595,842
set printmargins to 10,10,10,75
set the printscale to 0.8
print this cd from 10,10 to 595+75,842-90 into 10,10,595,842+30
close printing
The printscale stays the same regardless of how i set it, is there a problem with using the printscale command with the open printing with dialog command?
Posted: Thu Nov 06, 2008 7:06 am
by Janschenkel
The 'printscale' will be ignored when you use 'print from <point> to <point> into <rect>' - but apart from that, it is important to use 'formatForPrinting' properly.
- Use a separate stack, where the user cannot enter data.
- Setup your layout, set the 'formatForPrinting' of the stack to true
- Use Close and remove from memory to close your printing stack (or quit Revolution to make sure it is removed from memory)
- Then open it again, fill it with data by script, and print.
If you want an example stack, PM me with your email address.
HTH,
Jan Schenkel.
Posted: Thu Nov 06, 2008 9:44 am
by Mark
Hi Willie,
I don't think that sharedText, lockText, printScale etc. will solve your problem.
What happens if you make an otherwise completely empty stack, create one new field on it with one word, and execute
from the message box? Can you see the whole word on the print?
Best,
Mark
That works
Posted: Thu Nov 06, 2008 10:29 am
by wee wullie
Hi Mark,
I tried that and it works and prints perfectly, the field re-sizes even when set to bold.
On my stack, the text disappears when i try to re-size any of the fields unless i make the field extra long i.e. if a field has between 5 and 7 chars i need to size it for three or four times that in order to see the text, this is whether justified left, centre or right.
Willie.
Posted: Thu Nov 06, 2008 1:46 pm
by Mark
Hi Willie,
If I understand this correctly, you create a field in your stack and put text into it. If you print it immediately, it works fine. Then something happens and it doesn't print correctly anymore.
What is the "something" that happens? Do you resize the stack? Anything else?
Can you still see the complete text in the field on your stack, after printing?
Best,
Mark