Iterator<String> iter = patternsValue.keySet().iterator();
COSDictionary dic = new COSDictionary();
while( iter.hasNext() )
{
String name = iter.next();
PDPatternResources pattern = patternsValue.get( name );
dic.setItem( COSName.getPDFName( name ), pattern.getCOSObject() );
}
resources.setItem( COSName.PATTERN, dic );
}