public void drawImage(String uri, Rectangle rect)
throws IFException {
PDFXObject xobject = getPDFDoc().getXObject(uri);
if (xobject != null) {
if (accessEnabled) {
PDFStructElem structElem = (PDFStructElem) getContext().getStructureTreeElement();
prepareImageMCID(structElem);
placeImageAccess(rect, xobject);
} else {
placeImage(rect, xobject);
}
} else {
if (accessEnabled) {
PDFStructElem structElem = (PDFStructElem) getContext().getStructureTreeElement();
prepareImageMCID(structElem);
}
drawImageUsingURI(uri, rect);
flushPDFDoc();
}