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
-
shawnblc
- VIP Livecode Opensource Backer

- Posts: 342
- Joined: Fri Jun 01, 2012 11:11 pm
Post
by shawnblc » Sat May 04, 2013 12:50 am
I'm having some problems printing a card. My problem is that the whole card doesn't print. I've probably tried 20 different variations of code, but his is my latest. Any help from you veterans is very much appreciated.
Code: Select all
on mouseUp
hide button "btnPrint"
set the printPaperOrientation to "portrait"
--set the printMargins to 72,72,72,72
set the rect of group "grpAnswers" to the printRectangle
print card "gradeQuiz"
end mouseUp
-
FourthWorld
- VIP Livecode Opensource Backer

- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
-
Contact:
Post
by FourthWorld » Sat May 04, 2013 1:13 am
If your card is larger than the printPaperRect you can scale the contents using the "print...into [rect] form - see the Dictionary entry for the "print" command for details.
-
shawnblc
- VIP Livecode Opensource Backer

- Posts: 342
- Joined: Fri Jun 01, 2012 11:11 pm
Post
by shawnblc » Sat May 04, 2013 10:00 am
FourthWorld wrote:If your card is larger than the printPaperRect you can scale the contents using the "print...into [rect] form - see the Dictionary entry for the "print" command for details.
I still don't understand this printing stuff, but I appreciate your input. I do have everything printing now, but it's a hack job.
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7393
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Sat May 04, 2013 6:25 pm
You don't say how you solved it, but just in case: the "print into rect" command scales the printout to fit on the page. That means you don't need to set the rect of the group on the card, instead use "print into rect" so that the engine will shrink the output to fit. Maybe you've already done that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
shawnblc
- VIP Livecode Opensource Backer

- Posts: 342
- Joined: Fri Jun 01, 2012 11:11 pm
Post
by shawnblc » Sat May 04, 2013 7:19 pm
jacque wrote:You don't say how you solved it, but just in case: the "print into rect" command scales the printout to fit on the page. That means you don't need to set the rect of the group on the card, instead use "print into rect" so that the engine will shrink the output to fit. Maybe you've already done that.
I'll try that. Thank you Jacque. I simply changed the size of my stack to 550 (width) and reduced the font size to 9. It's a little small, but it's all printing on the page instead of not printing half of what I see on the card.
-
shawnblc
- VIP Livecode Opensource Backer

- Posts: 342
- Joined: Fri Jun 01, 2012 11:11 pm
Post
by shawnblc » Sat May 04, 2013 8:32 pm
Thank you Richard and Jacque, that's exactly what I needed. It just took me awhile to wrap my head around it (several hours)! Looks exactly how I was hoping it would look.
-
andrewferguson
- VIP Livecode Opensource Backer

- Posts: 184
- Joined: Wed Apr 10, 2013 5:09 pm
Post
by andrewferguson » Mon May 06, 2013 3:38 pm
If you are on windows, the formatForPrinting property might help. It sets the card to use the printers fonts, instead of the screen fonts.
Andrew
-
shawnblc
- VIP Livecode Opensource Backer

- Posts: 342
- Joined: Fri Jun 01, 2012 11:11 pm
Post
by shawnblc » Tue May 07, 2013 3:08 am
andrewferguson wrote:If you are on windows, the formatForPrinting property might help. It sets the card to use the printers fonts, instead of the screen fonts.
Andrew
I'm on a Mac.