Page 1 of 1
Printing as sheet
Posted: Sun Apr 07, 2013 10:04 am
by tellboy
When I use the following script it takes an age (seconds) for the dialogue boxes to appear:
Code: Select all
answer page setup as sheet
open printing with dialog as sheet
if the result is "Cancel" then exit mouseUp
print cd "barChart" from 0,0 to tRight,tBottom + 150
close printing
When I use the script but without the as sheet option the dialogue boxes appear almost instantly.
Am I doing something wrong or is LiveCode inefficient when calling the "as sheet" routines which are probably Cocoa based rather than the without "as sheet" which are probably Carbon based?
All the best
Re: Printing as sheet
Posted: Sun Apr 07, 2013 12:31 pm
by Dixie
hi...
Code: Select all
on mouseUp
answer page setup as sheet
put the result
wait 0 millisecs with messages
open printing with dialog as sheet
if the result is "cancel" then exit mouseUp
wait 0 millisecs with messages
end mouseUp
This seems to run fluidly on my Mac... using the wait to give the engine time to catch its breath..
Dixie
Re: Printing as sheet
Posted: Sun Apr 07, 2013 2:23 pm
by tellboy
Dixie wrote:using the wait to give the engine time to catch its breath..
Thanks for the reply, I have amended my script to :
Code: Select all
answer page setup as sheet
wait 0 millisecs with messages
open printing with dialog as sheet
if the result is "Cancel" then exit mouseUp
wait 0 millisecs with messages
print cd "barChart" from 0,0 to tRight,tBottom + 150
close printing
The results are:
Page Setup shows immediately
Click OK
9 Seconds until Print Dialog Shows
Select Open PDF in Preview to save paper
8 Seconds until preview of cd opens
If I do the above without the "as sheet" it all happens instantly.
Any other ideas I could try?
Thanks
Terry
Re: Printing as sheet
Posted: Fri Mar 07, 2014 1:09 pm
by tellboy
A little development with this issue
Code: Select all
on printChart
answer page setup as sheet
answer printer as sheet
put the printPaperRectangle into tPrintRect
print card from topLeft of me to bottomRight of me into tPrintRect
end printChart
I reported after the page setup dialog box comes up and the OK button was clicked there was a long wait, up to 9seconds,
before the printer dialog came up.
Normally after clicking the OK button in the page setup dialog I just sit there waiting for the printer dialog box.
I have just noticed that if I move my mouse across the screen after the page setup dialog has gone from the screen
then the printer dialog displays immediately. If I don’t move the mouse I have to wait for 9 seconds.
This is on a Mac running 10.9.2. Don’t know about windows.
Can someone verify this please?
Re: Printing as sheet
Posted: Fri Mar 07, 2014 1:29 pm
by Dixie
If I don’t move the mouse I have to wait for 9 seconds.
Yes, I am getting the same as you... All is fine as soon as you move the mouse
Re: Printing as sheet
Posted: Fri Mar 07, 2014 4:36 pm
by tellboy
Dixie wrote:Yes, I am getting the same as you... All is fine as soon as you move the mouse
Do you think this is a bug?