Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSInteger


     * @return flags The set of flags.
     */
    public int getFieldFlags()
    {
        int retval = 0;
        COSInteger ff = (COSInteger)getDictionary().getDictionaryObject( COSName.getPDFName( "Ff" ) );
        if( ff != null )
        {
            retval = ff.intValue();
        }
        return retval;
    }
View Full Code Here


     *
     * @param flags The new flags.
     */
    public void setFieldFlags( int flags )
    {
        COSInteger ff = new COSInteger( flags );
        getDictionary().setItem( COSName.getPDFName( "Ff" ), ff );
    }
View Full Code Here

        while( ((i = pdfSource.peek()) > 0) && ((char)i != ']') )
        {
            pbo = parseDirObject();
            if( pbo instanceof COSObject )
            {
                COSInteger genNumber = (COSInteger)po.remove( po.size() -1 );
                COSInteger number = (COSInteger)po.remove( po.size() -1 );
                COSObjectKey key = new COSObjectKey(number.intValue(), genNumber.intValue());
                pbo = document.getObjectFromPool(key);
            }
            if( pbo != null )
            {
                po.add( pbo );
View Full Code Here

            COSArray srcNums = (COSArray)srcLabels.getDictionaryObject( COSName.getPDFName( "Nums" ) );
            for( int i=0; i<srcNums.size(); i+=2 )
            {
                COSNumber labelIndex = (COSNumber)srcNums.getObject( i );
                long labelIndexValue = labelIndex.intValue();
                destNums.add( new COSInteger( labelIndexValue + destPageCount ) );
                destNums.add( cloneForNewDocument( destination, srcNums.getObject( i+1 ) ) );
            }
        }
       
        COSName metadata = COSName.getPDFName( "Metadata" );
View Full Code Here

     *
     * @param revision The new encryption version.
     */
    public void setRevision( int revision )
    {
        encryptionDictionary.setItem( COSName.getPDFName( "R" ), new COSInteger( revision ) );
    }
View Full Code Here

     * @return The permissions bit mask.
     */
    public int getPermissions()
    {
        int permissions = 0;
        COSInteger p = (COSInteger)encryptionDictionary.getDictionaryObject( COSName.getPDFName( "P" ) );
        if( p != null )
        {
            permissions = p.intValue();
        }
        return permissions;
    }
View Full Code Here

     *
     * @param p The new permissions bit mask
     */
    public void setPermissions( int p )
    {
        encryptionDictionary.setItem( COSName.getPDFName( "P" ), new COSInteger( p ) );
    }
View Full Code Here

        PDLineDashPattern pattern = null;
        COSArray d = (COSArray)dictionary.getDictionaryObject( "D" );
        if( d == null )
        {
            d = new COSArray();
            d.add( new COSInteger(3) );
            dictionary.setItem( "D", d );
        }
        COSArray lineArray = new COSArray();
        lineArray.add( d );
        //dash phase is not specified and assumed to be zero.
        lineArray.add( new COSInteger( 0 ) );
        pattern = new PDLineDashPattern( lineArray );
        return pattern;
    }
View Full Code Here

                    {
                        array.add( new COSString( (String)next ) );
                    }
                    else if( next instanceof Integer || next instanceof Long )
                    {
                        array.add( new COSInteger( ((Number)next).longValue() ) );
                    }
                    else if( next instanceof Float || next instanceof Double )
                    {
                        array.add( new COSFloat( ((Number)next).floatValue() ) );
                    }
View Full Code Here

     *
     * @param bpc The number of bits per component.
     */
    public void setBitsPerComponent( int bpc )
    {
        dictionary.setItem( COSName.getPDFName( "BPC" ), new COSInteger( bpc ) );
    }
View Full Code Here

TOP

Related Classes of org.pdfbox.cos.COSInteger

Copyright © 2018 www.massapicom. 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.