Delete page?



  • So I need to make a merge between two reports like this:

    So this what I did; I 've created an empty template, and put this in config:

    alt text

    It works well, except that it's printing the first "mother" page:

    alt text

    I don't want to create a new template containing two reports, that would mean double maintenance, I just need to delete this white page.

    Is there a way to hide it? This is ALL what i need to solve this: Delete first page (or last page if I do prepend instead).



  • You can remove a specific pdf page using custom script.
    Please check this part of the documentation
    https://jsreport.net/learn/pdf-utils#usage-in-script

    The script can look like this

    const jsreport = require('jsreport-proxy')
    
    async function afterRender(req, res) {
        res.content = await jsreport.pdfUtils.removePages(res.content, 1
    }
    

Log in to reply
 

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