Iterator iter = states.keySet().iterator();
COSDictionary dic = new COSDictionary();
while( iter.hasNext() )
{
String name = (String)iter.next();
PDExtendedGraphicsState state = (PDExtendedGraphicsState)states.get( name );
dic.setItem( COSName.getPDFName( name ), state.getCOSObject() );
}
resources.setItem( COSName.getPDFName( "ExtGState" ), dic );
}