Printing Weirdness...

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
cmhjon
Posts: 175
Joined: Tue Aug 04, 2015 11:55 am

Printing Weirdness...

Post by cmhjon » Tue Mar 27, 2018 9:13 pm

Hi all,

I have a couple minor printing issues and wanted to see if anyone has any suggestions:

1. My card is 8.5x11. When I print it for the first time (and only the first time), I get a blank page before I get the printed card (two total pages). If I print the card again, I only get the printed card. I assume it's something to do with the following code?:

set the printScale to 1
set the printMargins to 0,0,0,0

2. The aforementioned card that I am printing has several text fields on it. When I print it, the print out shows the last text field I entered text into as active (highlighted border) with a blinking cursor (vertical line) in it. If I click on a non-active area of the card to de-select said text field and print the card again, the print out now shows the first text field on the card as active with a blinking cursor in it.

Any thoughts on how to resolve these annoying (albeit minor) issues?

Thank you so much,
Jon

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Printing Weirdness...

Post by dunbarx » Tue Mar 27, 2018 9:50 pm

Odd.

What happens if you comment out those two lines? I do not see anything amiss with them though. I have used those before and never had an issue. On a Mac...

As for the blinking cursor, if it is present in a field, you will see it in the printout. Include a line of code that deselects, something like "select empty" or "click at -10,-10".

Craig Newman

cmhjon
Posts: 175
Joined: Tue Aug 04, 2015 11:55 am

Re: Printing Weirdness...

Post by cmhjon » Wed Mar 28, 2018 1:36 pm

Hi Craig,

Thank you for the reply. "select empty" seems to have solved the first issue.

Commenting the two lines of code seems to have done the trick BUT the printed card gets shifted to the right and down thus cutting it off (I am assuming it's a margin thing).

Best regards,
Jon

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Printing Weirdness...

Post by dunbarx » Wed Mar 28, 2018 3:26 pm

Printing is part magic and part luck. Play with the margins until you get it the way you want it. Try not to waste too much paper.

Craig

cmhjon
Posts: 175
Joined: Tue Aug 04, 2015 11:55 am

Re: Printing Weirdness...

Post by cmhjon » Wed Mar 28, 2018 3:39 pm

I've tried setting the margins from zero to 18. Margins get adjusted but I still get a blank page the first time I print. No blank page on all subsequent prints.

I'll live with it.

Best regards,
Jon

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Printing Weirdness...

Post by dunbarx » Wed Mar 28, 2018 5:47 pm

If you really get a blank page until you have printed at least once, and you have a stack that exhibits that behavior, by all means send it along the QCC.

I am very interested in what they will find.

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Printing Weirdness...

Post by jacque » Wed Mar 28, 2018 6:11 pm

My guess is that the card with any margins set is too large for the allowable print area on the printer. All printers have unprintable margins. When this happens LC will split the printout into two pages. In this case the first page is the top margin and the second page is the card content.

To avoid that, go back to setting the primtmargins to 0,0,0,0. If that alone doesn't work also add a very slight printscale, maybe .98 or so. You'd need to experiment.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

cmhjon
Posts: 175
Joined: Tue Aug 04, 2015 11:55 am

Re: Printing Weirdness...

Post by cmhjon » Wed Mar 28, 2018 6:26 pm

Hi Jacque,

I think the printScale suggestion did the trick!

Best regards,
Jon :)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Printing Weirdness...

Post by dunbarx » Wed Mar 28, 2018 10:17 pm

Jacque.

I get that LC might split the print job into two pages if it felt like it, and that changing the printScale might fix that.

But that was not the mystery. The OP can print just fine forever as long as he prints at least once. What would have changed in the environment to make that outrage repeatable, and, well, even possible?

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7230
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Printing Weirdness...

Post by jacque » Wed Mar 28, 2018 11:25 pm

What would have changed in the environment
No idea. Maybe something in the printer driver? One test would be to try a different printer, though that's not usually convenient.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Printing Weirdness...

Post by Mikey » Thu Mar 29, 2018 2:55 pm

I’m thinking about maybe doing a session at LCG on printing, but I have to admit that most of you know a LOT more about the topic than I do (so maybe you should do the talk). Anyway, for all your LC Printing Knowledge, please email me everything you can think of (or maybe you should do the talk - I like that idea even better).

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”