Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSDictionary.keyList()


    s = di.getSubject();
    if (s != null)
      entry.setField("abstract", s);

    COSDictionary dict = di.getDictionary();
    Iterator it = dict.keyList().iterator();
    while (it.hasNext()) {
      String key = ((COSName) it.next()).getName();
      if (key.startsWith("bibtex/")) {
        String value = dict.getString(key);
        key = key.substring("bibtex/".length());
View Full Code Here


        if( colorants == null )
        {
            colorants = new COSDictionary();
            dictionary.setItem( COSName.getPDFName( "Colorants" ), colorants );
        }
        Iterator iter = colorants.keyList().iterator();
        while( iter.hasNext() )
        {
            COSName name = (COSName)iter.next();
            COSBase value = colorants.getDictionaryObject( name );
            actuals.put( name.getName(), PDColorSpaceFactory.createColorSpace( value ) );
View Full Code Here

            ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
        }
        COSDictionary map = (COSDictionary)ap;
        Map actuals = new HashMap();
        Map retval = new COSDictionaryMap( actuals, map );
        Iterator asNames = map.keyList().iterator();
        while( asNames.hasNext() )
        {
            COSName asName = (COSName)asNames.next();
            COSStream as = (COSStream)map.getDictionaryObject( asName );
            actuals.put( asName.getName(), new PDAppearanceStream( as ) );
View Full Code Here

                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), ap );
            }
            COSDictionary map = (COSDictionary)ap;
            Map actuals = new HashMap();
            retval = new COSDictionaryMap( actuals, map );
            Iterator asNames = map.keyList().iterator();
            while( asNames.hasNext() )
            {
                COSName asName = (COSName)asNames.next();
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
View Full Code Here

                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), ap );
            }
            COSDictionary map = (COSDictionary)ap;
            Map actuals = new HashMap();
            retval = new COSDictionaryMap( actuals, map );
            Iterator asNames = map.keyList().iterator();
            while( asNames.hasNext() )
            {
                COSName asName = (COSName)asNames.next();
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
View Full Code Here

            dest.setItem(name, destDict);
        }
        if( sourceDict != null )
        {

            Iterator iterKeys = sourceDict.keyList().iterator();
            while (iterKeys.hasNext())
            {
                COSName key = (COSName) iterKeys.next();
                COSName mappedKey = (COSName) objectNameMap.get(key.getName());
                if (mappedKey == null)
View Full Code Here

            retval = stream.getStream();
        }
        else if( base instanceof COSDictionary )
        {
            COSDictionary dic = (COSDictionary)base;
            List keys = dic.keyList();
            retval = new COSDictionary();
            clonedVersion.put( base, retval );
            for( int i=0; i<keys.size(); i++ )
            {
                COSName key = (COSName)keys.get( i );
View Full Code Here

        }
        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)
                {
View Full Code Here

            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 );
View Full Code Here

            resources.setItem( COSName.FONT, fonts );
        }

        Map actuals = new HashMap();
        retval = new COSDictionaryMap( actuals, fonts );
        Iterator fontNames = fonts.keyList().iterator();
        while( fontNames.hasNext() )
        {
            COSName fontName = (COSName)fontNames.next();
            COSBase font = fonts.getDictionaryObject( fontName );
            //data-000174.pdf contains a font that is a COSArray, looks to be an error in the
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.