Sync orientation of header with document using pdfUtils

  • Dear jsReport Team,

    • There is one Header i use for all documents. The documents are landscaped dynamically by the api call.
    • I need the header to change orientation if the document does

    What i did so far is hand over a variable from the document to the header:

           landscape: {{getOrientation this}}
    function getOrientation(page){
        return page.items[0]
    {{{pdfAddPageItem true }}}

    Of course this way the header is always landscaped. So I was searching for a document parameter to change true dynamically. I investigated @root but there is only my data and

    Thank you for any kind of workaround.



  • How about passing the landscape information through the main data using custom script.
    See demo here

  • Thank you jan.

    It's working great. :)

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.