You need to make sure, resources of the Lotus agent include the most recent PD4ML library. You may check PD4ML version if you open a generated PDF in Acroread and review the document properties.

If the version is old, open the database in Lotus Designer remove pd4ml_demo.jar from the agent resources, save the database, quit designer, open the database in Designer again and add a new lib.