#28463

You may request the number after pd4ml.render() call:

System.out.println(“pages: ” + (Long)pd4ml.getLastRenderInfo(PD4Constants.PD4ML_TOTAL_PAGES));