The most flexible is to use jsreport script and use pdf utils in code
https://jsreport.net/learn/pdf-utils#usage-in-script
Demo
https://playground.jsreport.net/w/anon/39CGt28R
const jsreport = require('jsreport-proxy')
const axios = await jsreport.npm.require('axios@0.27.2')
async function afterRender (req, res) {
const r = await axios.get(req.data.url, {
responseType: 'arraybuffer'
})
res.content = await jsreport.pdfUtils.append(res.content, r.data)
}