I'm using PDFLib engine to generate the pdf files. I have used template feature of it and my code is as follow:
/* define the template */
template = p.begin_template_ext(width, height, "");
...template using text, vector, and image functions...
p.begin_page(page_width, page_height);
/* use the template */
p.fit_image(template, 0.0, 0.0, "");
...more page marking operations...
p.end_page();
...
p.close_image(template);
But it gives me an error like:
Function must not be called in object scope.
I'm not sure where I have done the mistake.
Thanks.