Rendering another template from script and merging
-
I'm trying to use this tutorial https://jsreport.net/learn/scripts#rendering-another-template-from-script but I don't know how to merge the first template with the second which was rendered using afterRender function. Any ideas?
-
@krutkowski86 assuming that you just want to embed template html into another template i think that it would more easy for you to use assets. here is a post that shows how to include common content in another template using assets.
-
I need to render another PDF file with different content (header, footer etc.) but the same input data. Assets aren't what I'm looking for.
-
@krutkowski86 embedding PDF result into other is something not supported at the moment, that would require manipulating PDF files, which jsreport does not do at the moment. this tutorial https://jsreport.net/learn/scripts#rendering-another-template-from-script just points the possibility to render a template and replace the entire content with the result of another one.
i'm afraid that after rendering both PDF files separately you will need to manipulate the PDF files on your own (using your favorite language) to include the pdf content of one file into another.