> I don’t think it is a path problem of the pd4ml.jar either, because the library is found, otherwise the whole PDF printing would not work.

The problem is not in finding of pd4ml.jar
The libraries from common lib/ and WEB-INF/lib/ are loaded by different classloaders. Libraries loaded from common lib/ may not see local web application resources.