Printing from group, not card?

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
Rf928
Posts: 10
Joined: Tue Apr 02, 2013 5:59 am

Printing from group, not card?

Post by Rf928 » Sat Oct 26, 2013 5:39 am

Hello,

I am printing to PDF, it is my understanding it will only accept a "card" to print off, and not a group. My issue is my screen is shorter than a PDF. I found a solution by extending the stack length and dragging the group to the bottom of the stack, off screen. This is rather cumbersome though, as if I want to make an edit I cannot unless I drag the group back up. I have used scrollbars as I should, it seemed to be an easy fix. But the main issue is not being able to "print" out of a group. It appears that it takes a picture of the card and places that picture on a PDF. I need it to take a picture of the card, even if it is off screen.

So my question is: Can I print out of a group, and not just a card? Or am I asking for trouble? Or maybe there is an easier fix that I haven't quite thought of yet.

Thank you

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Printing from group, not card?

Post by FourthWorld » Sat Oct 26, 2013 6:24 am

In many languages/toolkits, printing is done in a separate buffer from the screen display. This is how we commonly print in LC too. Make an invisible stack that fits the current printer metrics, put what you want on it, and print away.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Rf928
Posts: 10
Joined: Tue Apr 02, 2013 5:59 am

Re: Printing from group, not card?

Post by Rf928 » Mon Oct 28, 2013 3:59 pm

I am not sure I am understanding your solution correctly, let me re-phrase my question and provide examples.

Here, we have a single card stack:

Image

Note, the card has the two buttons, and a field.

This is the code I use for the top button, the bottom button is simply a reference with no function.

Image

So, with that code working as it should this is my result:

Image

Now, what I did was shorten the stack with the mouse, so it looks like this (take note of the bottom button now being "covered up"):

Image

And when I use my code, I get this:

Image

With the bottom button missing.

What I need, is a way to print EVERYTHING that is on the card, wether you can see it or not. Now with your suggestion, I am not sure if you mean to scale it all down so it fits on the stack, or what. My first solution is to find a bigger computer screen, but that is rather cumbersome.

Thank you for your time

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Printing from group, not card?

Post by Klaus » Mon Oct 28, 2013 4:16 pm

HI Rf928,

PRINT will always print the VISIBLE part of a stack/card!

You will need to:
1. make the stack as big as you need to display ALL objects
2. print card
3. then resize the stack to its original size

Best

Klaus

Post Reply