open printing, close printing, for print spool job
J. Landman Gay
jacque at hyperactivesw.com
Sun Dec 14 15:06:26 EST 2008
william humphrey wrote:
> Thanks but I'm looking for:
>
>
>> open printing
>> repeat with x = 1 to the number of lines of cardsToPrint
>> fillCardData (line x of cardsToPrint) -- load the fields here
>> print this card -- which now contains new data
>> end repeat
>
> close printing
>
>> And to have the printed cards all spool before printing. If you print to a
>> PDF then it would be a multiple page PDF. In the docs this should work but
>> for me only the last page is printing unless I do this:
>
>
> open printing
>
>> repeat with x = 1 to the number of lines of cardsToPrint
>> fillCardData (line x of cardsToPrint) -- load the fields here
>> print this card -- which now contains new data
>
> close printing
>
>> end repeat
>
>
> But then each card prints individually... not what I wanted.
The example I gave will spool all the data first, I just left off the
"open" and "close" printing commands (I assumed you'd keep those in
place.) So yes, you need this:
open printing with dialog
if the result = "cancel" then exit <handler>
repeat with x = 1 to the number of lines of cardsToPrint
fillCardData (line x of cardsToPrint) -- load the fields here
print this card -- which now contains new data
end repeat
close printing -- sends it all to printer
You will need to supply the correct info for "fillCardData", either a
handler with that name, or some code that replaces that line which will
read the database and fill the field contents in each iteration of the loop.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list