Leave feedback
  • Question

    Escape percentage sign in Post processing label

Enter a new topic
  • Peter Martens Peter Martens StreamServe Employee
    0 likes 292 views

    Hi, 

    We have to print the string <%LP> on the last page of a complex document, so we want to use the post processing label. 

    Of course the string <% is a command in the Post Processing labels, so we cannot put this in directly. 

    If we fill the variable connected to the label with "<3C>LP<3E>" it works, if we will this with "<3C>%LP<3E>" it doesn't work, the same for "<3C><25>LP<3E>" (25 is hex for the percentage sign). Escaping the percentage with "<3c>\%LP<3E>" prints <\%LP> so this does print the percentage together with the escape \. 

    Also "<[<%LP>]>" (escaping the whole string), doesn't work.

    Anyone any other ideas?

    (Of course we have an alternative, solving this with scripting in Storyteller, but if we can solve this with the label we can create a much more elegant solution.

    Regards,

    Peter 

    Tuesday 16 August, 2016
  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    Am very keen to hear about any answer to this.

    Mabe the demi-god Mr Bares can answer?

    Here's hoping.

    Friday 19 August, 2016
  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    1 likes

    <% is an introducer for metadata name. <%LP> is then a reference to metadata called LP

    I would just put something zero width-ish between < and %. Zero width space (U+200B) or zero width joiner (U+200D). The result looks just as expected. Use charmap to copy the character to clipboard.

    But if, for some reason, that is not acceptable, you would have to create a metadata with that value and include the metadata through <%MyMetadata>. Or you could just set the <%LP> as a value of LP metadata. Then your label should work as is.)

    Tuesday 23 August, 2016