How to check if generate PDF is requested from Print Container or Print page


#1

Hi,

I have created custom print page and loading few JS file as per my requirement. If I generate PDF from Print page it is working fine but if I generated PDF from print container the JS files are loading multiple times and creating an issue. How can I know if the generate PDF is requested from Print container or Print page. I’m using PIMCORE 5.2.x.

Thanks in advance.


#2

Hi,
hmm, can’t you use the HeadScript Helper for that?
https://pimcore.com/docs/5.x/Development_Documentation/MVC/Template/Templating_Helpers/HeadScript.html

BR
Christian