Please try to achieve this with the pdf utils extension.
https://jsreport.net/learn/pdf-utils
Especially this example should help
https://playground.jsreport.net/w/admin/ihh7laK2