You are trying to mix chrome native headers with the pdf utils which won't work.
I would recommend first installing full jsreport locally. Open the studio and fiddle with it to understand how it works. Only then get to your app and try to replicate the same using API calls.
The key on how to use the pdf utils from the API calls without storing templates is at the end of the docs
https://jsreport.net/learn/pdf-utils#api
The request could in the end looks something like this
{
"template": {
"content": "some pages in main",
"recipe": "chrome-pdf",
"engine": "handlebars",
"chrome": {
"marginTop": "50px"
},
"pdfOperations": [{
"template": {
"content": "{{#each $pdf.pages}}.. {{/each}}",
"recipe": "chrome-pdf",
"engine": "handlebars"
},
"type": "merge",
"mergeWholeDocument": true,
}]
}
}
We have some notes for developing with VS code here if you are interested
https://jsreport.net/blog/debug-jsreport-in-vscode