I have a template that can be rendered as either html or pdf. The pdf version is being created using the PDF module.
The template has a call to generate a dynamic image like this:
<img src="@@{MyController.generateImage()}">
When rendering the template as html, the generateImage() method gets called once.
When rendering the template as pdf, the generateImage() method gets called three times. Even though the method is called three times, the image only appears once in the pdf.
Does anyone have any ideas why pdf’ing the template would cause the generateImage() method to be called so many times?
I was using PDF module 0.7 and upgraded to 0.9 and it resolved my issue. I had previously been unable to upgrade to 0.9 due to conflicting libraries being used by my project and the PDF module, however, as a test I just removed the need for the conflicting library temporarily to see if 0.9 fixed the multiple call issue which it did.