Combine storyteller output and pdf file

edited February 27 in Exstream #1

In Exstream Storyteller 16.6, I've created a document that outputs as a PDF. I have another static PDF file that I would like to come out along with the one generated by Storyteller so that they come out as one combined file. However, no matter what I try, only one page comes out of the PDF I want to include. How do I do it correctly?


  • stig_2018


    In StoryTeller:

    "To output a multipage document, create an exact count page with a modification $num_pages on a count.
    In script before document calculate the dynamic number of document pages
    $num_pages = OverlayGetNumPages($doc_name);
    Page hase static fragment reference with modification on URI and page number. Increment the page
    number in the script before page. Page id for static fragment is 0 based."

    her is an example:

    if($attach_deliverynote = "1") {

        if($att_file != "") {

           $overlay_pages = overlaygetnumpages($att_file);

           $b = 1;

           while(num($b) <= num($overlay_pages)){

              $overlay_page = $b;






    //Stig :-)

  • dba01
    dba01 E Member

    Even though Stig's approach would work, it may not be the most efficient way how to append PDF pages into StoryTeller.
    * PDF is loaded twice - once in server (by function overlayGetNumPages() and once in StoryTeller engine
    * StoryTeller process is called as many times as there are pages in PDF

    Try to use similar approach as demonstrated in the attached SSD file. Use foo overlay instance to load the PDF and get number of pages. Then use repeater to go through all the pages.

    Always keep in mind that including PDF pages means to convert PDF to internal format first. That conversion may introduce some challenges as not everything in PDF is supported by StoryTeller.

    Dave Bares
    Product Manager