Leave feedback
  • Question

    Last page functionality in StoryTeller

Enter a new topic
  • Melker Eriksson Melker Eriksson StreamServe Employee
    0 likes 2027 views

    Hi!

    Does anyboy have an idea how to have "last page" functionality in StoryTeller (similar to pageOUT). Or is it just not possible due to the fact that StoryTeller does not run in preproc mode?

     

    Many thanks, 

    Melker

    Thursday 26 January, 2012
  • Best Answer
    David Bares David Bares OpenText Employee Administrator StreamServe Employee
    0 likes

    Congratulations.
    Same effect could be done if you added invisible horizontal line at the end of story (after the table) with script: $last = "true";

    Still I attached the project that I was cleaning for Stefan. It is perhaps not the minimum that is needed, but covers the concept. And add some more usable features.

    The minimum is to know THAT and WHERE the story ended. Then you just check if the payslip frame still fits and skip it in all other cases.

    We also have a little more complicated project, where customer requested that the payslip is placed on last front page when printing duplex. That I can post as well if requested.

    Wednesday 01 February, 2012

    Attached files

  • Evert R Evert R
    0 likes

    - Add new 'last' page in document
    - Occurence set to "Exact Count" --> 1

    Not sure if this is what you mean but this adds a last page to the storyteller document.

    Friday 27 January, 2012
  • Dan Byström Dan Byström
    0 likes

    Hi Melker!

    Sorry to disappoint but there is no last page functionality. StoryTeller use Content Dependentfragments which basically are place holders for overlays attached after the document have been processed. You can use CD to add page of pages and turn to the next page, but that's about it.

    Xpath is the way to go if you want logic to control what content should be placed on a specific page. It's not optimal although most problems can be solved using xpath.

    /Dan

    Friday 27 January, 2012
  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    0 likes

    What is it that you want to achieve on last page?

    Payment slip on last page scenario?
    That can quite easily be achieved by suppressing the payment slip until the main story is exhausted. Then you just need to check if the slip still fits or if in needs to go to next page. That is all. All in all some 10 lines of script. Simple projects that demonstrate how to do it are available.

    Or something else?

    Friday 27 January, 2012
  • Stefan Eklund Stefan Eklund StreamServe Employee
    0 likes

    David, can you please attach the "pay-slip" project?

    Thanks, Stefan

    Tuesday 31 January, 2012
  • Melker Eriksson Melker Eriksson StreamServe Employee
    0 likes

     

    Hi guys! Thanks for your replies.. It turned out that the customer was asking for a solution where a "Last page" label was added to the very last page, and "Please turn page" on all others. I implemented a simpe soultion where the current position of the Block that was used to repeat the table row was checked using the XPath function position(). Like this (script on before table row) $last = StEvalXpath("position() = last()"); //relative to the Block that was used in the repeater if ($last = "true") $FooterText = "Last page"; else if ($last = "false") $FooterText = "Please turn page"; Assuming of course that the storyframe with the table is added on all pages!

     

    Wednesday 01 February, 2012
  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    0 likes

    Congratulations.
    Same effect could be done if you added invisible horizontal line at the end of story (after the table) with script: $last = "true";

    Still I attached the project that I was cleaning for Stefan. It is perhaps not the minimum that is needed, but covers the concept. And add some more usable features.

    The minimum is to know THAT and WHERE the story ended. Then you just check if the payslip frame still fits and skip it in all other cases.

    We also have a little more complicated project, where customer requested that the payslip is placed on last front page when printing duplex. That I can post as well if requested.

    Wednesday 01 February, 2012

    Attached files

  • Stefan Eklund Stefan Eklund StreamServe Employee
    0 likes

    Thanks David, I find your small projects very usefull :)

    Tuesday 07 February, 2012

 

Latest from the blogs

Read more