Page 1 of 1

how do you print out two pages

Posted: Wed May 07, 2014 8:34 pm
by jalz
Hi Guys,

Working on printing out a card. The height of the card is the equivalent two A4 sheets. My print code below only seems to print 1 page. How do I force it to print the equivalent of the second page?

I've got my print code below, anyone out there to advise me how to get the second page out. Im wondering whether I need to split the second page onto another card and then print all cards, but I want explore doing everything on one card as its easier for me to format.

Code: Select all

on mouseUp
    reset printing
   set the printPaperOrientation to "portrait"
   --A4 dimensions are 595,842 
   --set the printPaperSize to 595,842
   set the printMargins to 13,0,13,0
   --set the printMargins to 72,144,72,144
   set the printGutters to 0,0
   print this card --from 0,30 to 595,842
   close printing
   
end mouseUp
Thanks
Jalz

Re: how do you print out two pages

Posted: Wed May 07, 2014 9:20 pm
by Klaus
Hi Jalz,

check "open printing" in the dictionary!
This will let you print more than one card.

Code: Select all

...
open printing
##open printing with dialog
##open printing with dialog as sheet
repeat with x = 1 to the number of cards
   print card
end repeat
close printing
...
See also "break" (keyword)! :D

Best

Klaus

Re: how do you print out two pages

Posted: Wed May 07, 2014 9:24 pm
by jalz
Hi Klaus,

Thanks as always for your help. Just before I go check, your script implies that I need to recreate 'page 2' on another card, and then loop through the cards using print card. Is that correct?

right off to look at the dictionary again and check….

Jalz

Re: how do you print out two pages

Posted: Wed May 07, 2014 9:28 pm
by Klaus
Hi Jalz,

maybe I misunderstood you?
Do you want to print a card that is large than one "page" on two "pages"?
Or print more than one card?


Best

Klaus

Re: how do you print out two pages

Posted: Wed May 07, 2014 9:35 pm
by jalz
Hi Klaus,

At present I have a card which is approximately 1600pt in height. Based on that I am trying to print this card out, if I try to print it out on A4, I would expect the content of the card should fit comfortably on two pages of A4. I would like to know how I can print the bottom/second page if thats possible.

Hope that makes sense. I've added a simple stack to show you what I mean. I would like to print the whole thing out.

Thanks
Jalz

Re: how do you print out two pages

Posted: Thu May 08, 2014 12:56 pm
by Klaus
Hi Jalz,

"ususally" a big card will be printed automatically on X (whatever) pages are necessary.

A card will be printed "as is", so in your stack you would need to (temporarily) set the height
of your card to the "formatedheigth" of the card, print the card and then reset to initial height.


Best

Klaus

Re: how do you print out two pages

Posted: Thu May 08, 2014 1:17 pm
by jalz
Hi Klaus,

I think I tried that yesterday whilst testing printing my long card. Although two pages were sent to the printer, only the first page had data. I'll double check again when I'm back at home as I tried a combination of things.

The data that is contained in the long card, is data that has come out a datagrid and formatted in a particular way. Do you think it would be better splitting this data into card 1 for page 1, card 2 for page 2, card 3 for page etc.? I just tend to find formatting all the data onto one long card as to splitting it on multiple cards easier.

Jalz

Re: how do you print out two pages

Posted: Thu May 08, 2014 2:45 pm
by Klaus
Hi Jalz,

in your case you maybe should:
1. make the datagrid fit on the (small and completely visible) card
2. OPEN PRINTING -> print the card
3. PRINT BREAK ## force a new page
4. Scroll the next lines of the datagrid into view!
5. print card again
6. - N. repeat 4, 5 and 6 as neccessary
N + 1. CLOSE PRINTING
:D


Best

Klaus