Developer forum

Forum » CMS - Standard features » Generate PDF from Pages with jQuery

Generate PDF from Pages with jQuery

George Nelzo Pereira
Reply

Hi,

I'm using "&pdf=true" to have a pdf. That's working fine but when I'm trying do something in the page with jQuery code this code is not work... when I took off "&pdf=true" from querystring than jQuery code is working fine.

I have one list of div, like 10 itens, I'm print some of than when is a normal page (like 8) but when is a PDF I need to remove some and keep a few (like show just 3).

I cannot execute jQuery when will generate a PDF or can be a mistake?

 


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

No, you cannot execute javascript when creating the PDF. You have to use css instead.

If request.pdf is true, then add some CSS that does your magic.

Votes for this answer: 1

 

You must be logged in to post in the forum