Package org.apache.pdfbox.cos

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


        {
            COSDictionary states = (COSDictionary) resources.getDictionaryObject(COSName.EXT_G_STATE);
            if (states != null)
            {
                graphicsStates = new HashMap<String, PDExtendedGraphicsState>();
                for (COSName name : states.keySet())
                {
                    COSDictionary dictionary = (COSDictionary) states.getDictionaryObject(name);
                    graphicsStates.put(name.getName(), new PDExtendedGraphicsState(dictionary));
                }
            }
View Full Code Here


        {
            COSDictionary patternsDictionary = (COSDictionary) resources.getDictionaryObject(COSName.PATTERN);
            if (patternsDictionary != null)
            {
                patterns = new HashMap<String, PDPatternResources>();
                for (COSName name : patternsDictionary.keySet())
                {
                    COSDictionary dictionary = (COSDictionary) patternsDictionary.getDictionaryObject(name);
                    patterns.put(name.getName(), PDPatternResources.create(dictionary));
                }
            }
View Full Code Here

        {
            COSDictionary shadingsDictionary = (COSDictionary) resources.getDictionaryObject(COSName.SHADING);
            if (shadingsDictionary != null)
            {
                shadings = new HashMap<String, PDShadingResources>();
                for (COSName name : shadingsDictionary.keySet())
                {
                    COSDictionary dictionary = (COSDictionary) shadingsDictionary.getDictionaryObject(name);
                    shadings.put(name.getName(), PDShadingResources.create(dictionary));
                }
            }
View Full Code Here

        COSDocument cosDocument = context.getDocument().getDocument();
        COSDictionary extGStates = COSUtils.getAsDictionary(egsEntry, cosDocument);

        if (extGStates != null)
        {
            for (Object object : extGStates.keySet())
            {
                COSName key = (COSName) object;
                if (key.getName().matches(TRANPARENCY_DICTIONARY_KEY_EXTGSTATE_ENTRY_REGEX))
                {
                    COSBase gsBase = extGStates.getItem(key);
View Full Code Here

            if( op.getOperation().equals( "BI" ) )
            {
                output.write( "BI".getBytes("ISO-8859-1") );
                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

                fontsDictionary = new COSDictionary();
                resources.setItem( COSName.FONT, fontsDictionary );
            }
            else
            {
                for( COSName fontName : fontsDictionary.keySet() )
                {
                    COSBase font = fontsDictionary.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, xobjectsDictionary );
            }
            else
            {
                xobjects = new HashMap<String,PDXObject>();
                for( COSName objName : xobjectsDictionary.keySet() )
                {
                    PDXObject xobject = null;
                    try
                    {
                        xobject = PDXObject.createXObject( xobjectsDictionary.getDictionaryObject(objName) );
View Full Code Here

        {
            COSDictionary csDictionary = (COSDictionary)resources.getDictionaryObject( COSName.COLORSPACE );
            if( csDictionary != null )
            {
                colorspaces = new HashMap<String,PDColorSpace>();
                for( COSName csName : csDictionary.keySet() )
                {
                    COSBase cs = csDictionary.getDictionaryObject( csName );
                    PDColorSpace colorspace = null;
                    try
                    {
View Full Code Here

        {
            COSDictionary states = (COSDictionary)resources.getDictionaryObject( COSName.EXT_G_STATE );
            if( states != null )
            {
                graphicsStates = new HashMap<String,PDExtendedGraphicsState>();
                for( COSName name : states.keySet() )
                {
                    COSDictionary dictionary = (COSDictionary)states.getDictionaryObject( name );
                    graphicsStates.put( name.getName(), new PDExtendedGraphicsState( dictionary ) );
                }
            }
View Full Code Here

        {
            COSDictionary patternsDictionary = (COSDictionary)resources.getDictionaryObject( COSName.PATTERN );
            if( patternsDictionary != null )
            {
                patterns = new HashMap<String,PDPatternResources>();
                for( COSName name : patternsDictionary.keySet() )
                {
                    COSDictionary dictionary = (COSDictionary)patternsDictionary.getDictionaryObject( name );
                    patterns.put( name.getName(), PDPatternResources.create( dictionary ) );
                }
            }
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.