}
public Image toImage(byte[] input, int pageNumber, int scale, boolean transparent) throws PageException {
Document document = toDocument(input);
BufferedImage bi=toBufferedImage(document,pageNumber,scale/100f,transparent);
document.dispose();
return new Image(bi);
}
@Override
public void writeImages(byte[] input, Set pages, Resource outputDirectory,