Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSInteger.intValue()


            {
                COSInteger key = (COSInteger)namesArray.getObject(i);
                COSBase cosValue = namesArray.getObject( i+1 );
                Object pdValue = convertCOSToPD( cosValue );

                indices.put( Integer.valueOf(key.intValue()), pdValue );
            }
            indices = Collections.unmodifiableMap(indices);
        }

        return indices;
View Full Code Here


                throw new IOException("Could not read JBIG2 image", e);
            }

            // I am assuming since JBIG2 is always black and white
            // depending on your renderer this might or might be needed
            if (image.getColorModel().getPixelSize() != bits.intValue())
            {
                if (bits.intValue() != 1)
                {
                    LOG.warn("Attempting to handle a JBIG2 with more than 1-bit depth");
                }
View Full Code Here

            // I am assuming since JBIG2 is always black and white
            // depending on your renderer this might or might be needed
            if (image.getColorModel().getPixelSize() != bits.intValue())
            {
                if (bits.intValue() != 1)
                {
                    LOG.warn("Attempting to handle a JBIG2 with more than 1-bit depth");
                }
                BufferedImage packedImage = new BufferedImage(image.getWidth(), image.getHeight(),
                        BufferedImage.TYPE_BYTE_BINARY);
View Full Code Here

            for( int i=0; i<namesArray.size(); i+=2 )
            {
                COSInteger key = (COSInteger)namesArray.getObject(i);
                COSBase cosValue = namesArray.getObject( i+1 );
                COSObjectable pdValue = convertCOSToPD( cosValue );
                indices.put( key.intValue(), pdValue );
            }
            indices = Collections.unmodifiableMap(indices);
        }
        return indices;
    }
View Full Code Here

    {
        int retval = 0;
        COSInteger ff = (COSInteger) getDictionary().getDictionaryObject(COSName.FF);
        if (ff != null)
        {
            retval = ff.intValue();
        }
        else if (getParent() != null)
        {
            retval = getParent().getFieldFlags();
        }
View Full Code Here

    {
        int retval = 0;
        COSInteger ff = (COSInteger) getDictionary().getDictionaryObject(COSName.FF);
        if (ff != null)
        {
            retval = ff.intValue();
        }
        // There is no need to look up the parent hierarchy within a non terminal field
        return retval;
    }
View Full Code Here

        else if (kid instanceof COSInteger)
        {
            // An integer marked-content identifier denoting a
            // marked-content sequence
            COSInteger mcid = (COSInteger) kid;
            return mcid.intValue();
        }
        return null;
    }

}
View Full Code Here

            appendRawCommands(OPENING_BRACKET);
            appendRawCommands(SPACE);
            for (COSBase cosBase : inlineImage.getDecode())
            {
                COSInteger cosInt = (COSInteger) cosBase;
                appendRawCommands(Integer.toString(cosInt.intValue()));
                appendRawCommands(SPACE);
            }
            appendRawCommands(CLOSING_BRACKET);
            appendRawCommands("\n");
        }
View Full Code Here

                {
                    COSInteger genNumber = (COSInteger)po.remove( po.size() -1 );
                    if (po.get(po.size()-1) instanceof COSInteger)
                    {
                        COSInteger number = (COSInteger)po.remove( po.size() -1 );
                        COSObjectKey key = new COSObjectKey(number.intValue(), genNumber.intValue());
                        pbo = document.getObjectFromPool(key);
                    }
                    else
                    {
                        // the object reference is somehow wrong
View Full Code Here

                {
                    COSInteger genNumber = (COSInteger)po.remove( po.size() -1 );
                    if (po.get(po.size()-1) instanceof COSInteger)
                    {
                        COSInteger number = (COSInteger)po.remove( po.size() -1 );
                        COSObjectKey key = new COSObjectKey(number.intValue(), genNumber.intValue());
                        pbo = document.getObjectFromPool(key);
                    }
                    else
                    {
                        // the object reference is somehow wrong
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.