Failing to produce multiple-page PDF

Robert Brenstein rjb at robelko.com
Sun Nov 9 11:46:38 EST 2014


On 09.11.2014 at 8:24 Uhr -0800 Dr. Hawkins apparently wrote:
>On Sun, Nov 9, 2014 at 8:04 AM, Robert Brenstein <rjb at robelko.com> wrote:
>
>>  However, when I use the printing into a rectangle format, I get a PDF file
>>  with only a single page. It seems that all cards are printed onto the same
>>  page, so mostly objects from the last card printed are visible.
>>  Furthermore, the card objects seem to be moved and resized in the output.
>>
>  > A code snippet would help.
>

works

open printing to PDF vPdfFilePath
    repeat for each word vTemplate in kTemplateList
       put templateStackName(gProjectCache[vTemplate]["value"]) into vStackName
       print card 1 of stack vStackName
    end repeat
close printing

prints all cards onto the same page:

open printing to PDF vPdfFilePath
    repeat for each word vTemplate in kTemplateList
       put templateStackName(gProjectCache[vTemplate]["value"]) into vStackName
       put the height of stack vStackName into vCardHeight
       put the width of stack vStackName into vCardWidth
       put trunc((vPrintWidth/vCardWidth)*vCardHeight) into vPrintHeight
       put vPageRect into vPrintRect
       put vPrintHeight+(item 2 of vPageRect) into item 4 of vPrintRect
       print card 1 of stack vStackName into vPrintRect
    end repeat
close printing

RObert




More information about the use-livecode mailing list