output.write( COSWriter.ARRAY_CLOSE );
}
else if( o instanceof COSDictionary )
{
COSDictionary obj = (COSDictionary)o;
output.write( COSWriter.DICT_OPEN );
for (Iterator i = obj.keyList().iterator(); i.hasNext();)
{
COSName name = (COSName) i.next();
COSBase value = obj.getItem(name);
if (value != null)
{
writeObject( name );
output.write( SPACE );
writeObject( value );
output.write( SPACE );
}
}
output.write( COSWriter.DICT_CLOSE );
output.write( SPACE );
}
else if( o instanceof PDFOperator )
{
PDFOperator op = (PDFOperator)o;
if( op.getOperation().equals( "BI" ) )
{
output.write( "BI".getBytes() );
ImageParameters params = op.getImageParameters();
COSDictionary dic = params.getDictionary();
Iterator iter = dic.keyList().iterator();
while( iter.hasNext() )
{
COSName key = (COSName)iter.next();
Object value = dic.getDictionaryObject( key );
key.writePDF( output );
output.write( SPACE );
writeObject( value );
output.write( EOL );
}