}
}
public void setSource(String document, String encoding, String urlPrefix, NSDictionary<String, Object> configuration) throws UnsupportedEncodingException {
InputStream is = new ByteArrayInputStream(document.getBytes(encoding));
documentPrinter = new DocumentPrinter(is, documentProperties);
documentPrinter.setResourceLoader(new HttpResourceLoader(urlPrefix));
}