Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSDictionary.keySet()


            ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
        }
        COSDictionary map = (COSDictionary)ap;
        Map<String, PDAppearanceStream> actuals = new HashMap<String, PDAppearanceStream>();
        Map retval = new COSDictionaryMap( actuals, map );
        for( COSName asName : map.keySet() )
        {
            COSStream as = (COSStream)map.getDictionaryObject( asName );
            actuals.put( asName.getName(), new PDAppearanceStream( as ) );
        }
View Full Code Here


                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
            }
            COSDictionary map = (COSDictionary)ap;
            Map<String, PDAppearanceStream> actuals = new HashMap<String, PDAppearanceStream>();
            retval = new COSDictionaryMap( actuals, map );
            for( COSName asName : map.keySet() )
            {
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
            }
        }
View Full Code Here

        if( colorants == null )
        {
            colorants = new COSDictionary();
            dictionary.setItem( COSName.COLORANTS, colorants );
        }
        for( COSName name : colorants.keySet() )
        {
            COSBase value = colorants.getDictionaryObject( name );
            actuals.put( name.getName(), PDColorSpaceFactory.createColorSpace( value ) );
        }
        return new COSDictionaryMap( actuals, colorants );
View Full Code Here

            }
            COSDictionary map = (COSDictionary)ap;
            Map<String, PDAppearanceStream> actuals =
                new HashMap<String, PDAppearanceStream>();
            retval = new COSDictionaryMap( actuals, map );
            for( COSName asName : map.keySet() )
            {
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
            }
        }
View Full Code Here

        if( colorspaces != null )
        {
            Map actuals = new HashMap();
            retval = new COSDictionaryMap( actuals, colorspaces );
            for( COSName csName : colorspaces.keySet() )
            {
                COSBase cs = colorspaces.getDictionaryObject( csName );
                actuals.put( csName.getName(), PDColorSpaceFactory.createColorSpace( cs ) );
            }
        }
View Full Code Here

        if( states != null )
        {
            Map actuals = new HashMap();
            retval = new COSDictionaryMap( actuals, states );
            for( COSName name : states.keySet() )
            {
                COSDictionary dictionary = (COSDictionary)states.getDictionaryObject( name );
                actuals.put( name.getName(), new PDExtendedGraphicsState( dictionary ) );
            }
        }
View Full Code Here

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

        Map actuals = new HashMap();
        retval = new COSDictionaryMap( actuals, fonts );
        for( COSName fontName : fonts.keySet() )
        {
            COSBase font = fonts.getDictionaryObject( fontName );
            //data-000174.pdf contains a font that is a COSArray, looks to be an error in the
            //PDF, we will just ignore entries that are not dictionaries.
            if( font instanceof COSDictionary )
View Full Code Here

            resources.setItem( COSName.XOBJECT, xobjects );
        }

        Map actuals = new HashMap();
        retval = new COSDictionaryMap( actuals, xobjects );
        for( COSName objName : xobjects.keySet() )
        {
            COSBase cosObject = xobjects.getDictionaryObject(objName);
            PDXObject xobject = PDXObject.createXObject( cosObject );
            if( xobject !=null )
            {
View Full Code Here

            resources.setItem( COSName.XOBJECT, images );
        }

        Map actuals = new HashMap();
        retval = new COSDictionaryMap( actuals, images );
        for( COSName imageName : images.keySet() )
        {
            COSStream image = (COSStream)(images.getDictionaryObject(imageName));

            COSName subType =(COSName)image.getDictionaryObject(COSName.SUBTYPE);
            if( subType.equals(COSName.IMAGE) )
View Full Code Here

            if( op.getOperation().equals( "BI" ) )
            {
                output.write( "BI".getBytes() );
                ImageParameters params = op.getImageParameters();
                COSDictionary dic = params.getDictionary();
                for( COSName key : dic.keySet() )
                {
                    Object value = dic.getDictionaryObject( key );
                    key.writePDF( output );
                    output.write( SPACE );
                    writeObject( value );
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.