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!
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.
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
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.
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
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.
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
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.
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 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