set the printColors to false

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

set the printColors to false

Post by Timothy » Mon May 15, 2006 9:53 pm

This little issue has been vexing me for some time.

I have a stack consisting of one large card, intended to print onto an 8.5 X 11 inch form. When it's ready to print, it looks fine on the screeen.

If I print it from the print command in the file menu, it prints okay, except it doesn't print in the right places, because I haven't set the margins and the print rect.

Normally, I print with the following simple scrpt:

open printing with dialog
set the printColors to false
set printMargins to 0,0,0,0
print card from 21,21 to 654,754
close printing

The first time I print the card with this script, the area defined by the print rect gets a uniform light-gray mist printed over it. If I don't change anything, and run the same script again, it works fine until I quit RR and start again. Then the problem occurs again, once.

I've made sure all the colors on the card, stack, and all the fields are set to white.

I tried running the script from the msg box while watching the message watcher. No handler appears to be contributing to this issue.

"set the printcolors to false" appears to be the offending line. As far as I can tell, the issue goes away if I remove it. I could get along without it, but it has some convenient features.

Maybe there's something I don't know about "set the printColors to false," or maybe there's a tiny little bug at work here.

Any thoughts? Thanks in advance.


Tim

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Wed May 17, 2006 10:41 pm

I tried this on a couple of other stacks. Same thing happens. I guess that means I have replicated the phenomenon and it might be a bug. Any suggestions or comments before I send it to bugzilla?

Tim

pevensen
Posts: 21
Joined: Mon Apr 10, 2006 2:50 pm
Location: St. Louis, MO, USA
Contact:

formatForPrinting

Post by pevensen » Thu May 18, 2006 7:07 pm

Do you have the stack's formatForPrinting set to true? If not, that might make a difference. I now it dramatically changes how fonts print.
Peter Evensen
[url]http://www.PetersRoadtoHealth.com[/url]

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Mon May 22, 2006 7:54 pm

Hi Peter,

No, it's set to its default value, which is false. This is on an OS X machine, anyway. I think that property is ignored in OS X.

Any other ideas?

I want to submit a responsible bug report, if that's what this is. But I don't want to submit a fase bug report, either.

I tried replicating this issue on yet another stack. RR quit spontaneously four times in a row. I think I can still replicate that, but only on that stack. RR NEVER quits on me! (Well, hardly ever...)

Tim

Lynn P.
Posts: 79
Joined: Sun Apr 09, 2006 1:09 pm

Re: set the printColors to false

Post by Lynn P. » Tue May 23, 2006 3:21 pm

Hi Tim ~

Try changing the order of your "open print with dialog" call. Set up all the formatting prior to calling any print routine that interacts with the print driver.
This worked for me using OS X 10.3 & 10.4 with HP Photosmart 7150 and Rev Studio 2.7:

on myPrintRoutine
set the backgroundColor of this card to white
set the printColors to false
set printMargins to 0,0,0,0
open printing with dialog
if the result is "Cancel" then exit myPrintRoutine
print card from 21,21 to 654,754
close printing
end myPrintRoutine

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Tue May 23, 2006 6:59 pm

Excellent point, Lynn,

Now that you mention it, it does seem like I have those lines in the wrong sequence.

If I learn anything of possible interest to others, I'll report back.

Tim

Timothy
Posts: 78
Joined: Tue Apr 11, 2006 7:38 pm

Post by Timothy » Tue Jun 06, 2006 1:26 am

If anyone's been watching this thread, it looks like the problem disappeared when I moved "set the printcolors to false" so it appears in the script before "open printing"

Cheers,


Tim

Lynn P.
Posts: 79
Joined: Sun Apr 09, 2006 1:09 pm

Post by Lynn P. » Tue Jun 06, 2006 1:56 am

Timothy wrote:If anyone's been watching this thread, it looks like the problem disappeared when I moved "set the printcolors to false" so it appears in the script before "open printing"

Cheers,


Tim
``````````````````
Glad to hear you're back in business Tim! :D

Post Reply

Return to “Talking LiveCode”