open printing with dialog -- Windows equiv?

Frank D. Engel, Jr. fde101 at fjrhome.net
Tue Nov 23 10:30:26 EST 2004


Works fine.  Now I have two more issues to deal with:

I have a "preparing printout" type of window which is supposed to be 
displayed when processing starts for the printout.  Basically, my code 
runs something like this:

open stack "preparing printout"   -- no title bar or anything, just a 
simple window with some label fields
open stack "printer stack"  -- hidden window in which the printout is 
prepared, format for printing set to true

prepare the printout
print the printout

close stack "preparing printout"


1. The "preparing printout" stack is not displayed under Windows (works 
fine under OS X).  Note that the Print dialog is displayed after this 
(part of the "print the printout" step), and that is working fine now 
(thanks to the quoted thread), but my "please wait" type dialog never 
shows up under Windows.  Tested with WinXP, Win2K, and WinNT4.

2. No version of Windows prints correctly.  I get different results 
for each of the versions listed above.  Printing works fine under OS X. 
  As previously noted, "format for printing" is set to true.


Under all versions of Windows, some images which I place into text 
fields using the imageSource property of a character has the original 
size of the image loaded into an image object, rather than the 
(reduced) size of the image object.  This is a problem, since the 
fields are resized by one of my handlers to accommodate the smaller 
size which the image objects are scaled to.  Mac OS X does the 
desirable thing, and uses the smaller size.  If this is a 
Windows-specific thing, I can resize the images manually with a 
painting program and provide lower-resolution images for use when 
printing from Windows, but given that the new images will be 8 pixels 
squared, they will be of rather poor quality when printing at a larger 
size (I print the card into a larger area on the page).  Obviously, I 
would prefer the higher resolution image in order to print a bit 
better.

Note that one of these fields would have a single line of text and be 
half the size needed for the (oversized) image.  Windows responds by 
placing the line of text at the bottom of the image.  Since I resize 
the field based on the formattedHeight, I would expect that the result 
would be a field large enough to accommodate this, which is what I get 
with W2K.  NT4 and XP, however, give me a field big enough for the line 
of text, but the larger image pushes the text below the bottom of the 
field, so that it does not print.

Additionally, the text in some of the other fields (with no images 
present) does not print at all under NT4 or 2000, but it does print 
correctly under XP.

Several paragraphs in one of the fields get separated with inordinately 
large vertical "gaps" under NT4 and 2000, but not under XP.

In all three versions of Windows, lines from table fields and 
underlines from text print so light that parts of them are missing, and 
the rest seem so muted as to be worthless.  Also in all three versions, 
the right margins of some fields seems to extend past the right edge of 
the field, so that text goes beyond the edge of the field and is thus 
"chopped off", so that some of the text is missing.

All tests to a Brother HL-1270N laser printer (Postscript clone); again 
none of these problems occur under OS X.  I'm not sure how much of this 
would be due to bugs in Rev and how much of it has to do with 
cross-platform printing in general.

Any help with this would be greatly appreciated!

Thank you!

On Nov 19, 2004, at 3:57 PM, Frank D. Engel, Jr. wrote:

> Aha!  That's what I was missing!
>
> Thank you, I'll try this out, prob. tomorrow now...
>
> On Nov 19, 2004, at 3:48 PM, Mark Talluto wrote:
>
>>
>> On Nov 19, 2004, at 12:40 PM, Frank D. Engel, Jr. wrote:
>>
>>> The "open printing with dialog" command does not display a print 
>>> dialog under Windows (as per the docs, as well as it simply not 
>>> working, which is why I read this in the docs); is there any way to 
>>> display the print dialog under Windows when doing this type of 
>>> printing?
>>>
>>> Thank you!
>>
>>
>> Hi Frank,
>>
>> Here is a little snippet from one of my projects that manages 
>> printing on both platforms:
>>
>> if the platform is "MacOs" then
>>     set the printmargins to 36,36,36,36
>>     open printing with dialogs
>>     if the result is empty then
>>       put the num of cards into nCards
>>       repeat with y = 1 to nCards
>>         print card y
>>       end repeat
>>       close printing
>>     end if
>>   end if
>>
>>   if the platform is "win32" then
>>     set the printmargins to 36,36,36,36
>>     answer printer
>>     if the result is empty then
>>       put the num of cards into nCards
>>       repeat with y = 1 to nCards
>>         print card y
>>       end repeat
>>       close printing
>>     end if
>>   end if
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
> -----------------------------------------------------------
> Frank D. Engel, Jr.  <fde101 at fjrhome.net>
>
> $ ln -s /usr/share/kjvbible /usr/manual
> $ true | cat /usr/manual | grep "John 3:16"
> John 3:16 For God so loved the world, that he gave his only begotten 
> Son, that whosoever believeth in him should not perish, but have 
> everlasting life.
> $
>
>
>
> ___________________________________________________________
> $0 Web Hosting with up to 120MB web space, 1000 MB Transfer
> 10 Personalized POP and Web E-mail Accounts, and much more.
> Signup at www.doteasy.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>

$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten 
Son, that whosoever believeth in him should not perish, but have 
everlasting life.
$



___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com



More information about the use-livecode mailing list