Map xobjects = context.getXObjects();
PDXObject xobject = (PDXObject) xobjects.get(name.getName());
if(xobject instanceof PDXObjectForm)
{
PDXObjectForm form = (PDXObjectForm)xobject;
COSStream invoke = (COSStream)form.getCOSObject();
PDResources pdResources = form.getResources();
PDPage page = context.getCurrentPage();
if(pdResources == null)
{
pdResources = page.findResources();
}