PD4ML does not support Javascript and we have no plans to support it. The topic with a tricky workaround is discussed by the link:

Alternatively you may give a try to PD4ML Web wrapper to a PhantomJS HTML->PDF converter module. http://pd4ml.com/pd4ml_web.htm Its functionality is planned to be included to PD4ML v4 as an option.