How can we set phantomjs custom margin in jquery.



  • Hi,

    We have requirement to show/hide header and footer that we achieve in jquery but when we hide the header/footer then empty space are shown.
    Is there way to set phantomjs custom margin in jquery.

    Thanks in advance.


  • administrators

    hi! javascript in the context of the template (code that it is executed as part of the page) can't modify high level options like phantom margin. however if your data has some way to identify that the report should have custom margin then you can do it prior in a script. here is an example

    We have requirement to show/hide header and footer that we achieve in jquery but when we hide the header/footer then empty space are shown.

    can you show me how did you do that? i think you are referring to something like browser sdk where you changed the phantom header option before rendering, right?



  • Hi,

    I have created sample of what I'm doing.
    https://playground.jsreport.net/studio/workspace/ByDntplAW/29

    Thanks in Advance.


  • administrators

    i see, unfortunately no matter if you make the content in header/footer invisible the headerHeight value will always make the page to reserve that space. i guess that you want that some pages have header/footer and others not without reserving some space in all pages. in that case you are better trying to replicate header/footer feature on your own. check this topic and this post for some information that can help you in doing that.



  • Thanks


Log in to reply
 

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