When I use the following method from your examples To try To make a stencil file with PNG images:
public static Master createMaster(final int masterId, final String name, final java.awt.Image image) throws Exception {
…...Excel, PowerPoint, Visio, PDF, CAD & several other categories...Excel, PowerPoint, Visio, PDF, CAD & several other categories...