Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSNumber.intValue()


        // add new page to kids entry in the pages dictionary
        COSArray kids = (COSArray) pages.getItem(COSName.getPDFName("Kids"));
        kids.add(destination.createObject(page));
        // and increase count
        COSNumber count = (COSNumber) pages.getItem(COSName.COUNT);
        pages.setItem(COSName.COUNT, new COSInteger(count.intValue() + 1));
    }
    /**
     * concat two pdf documents and fill fields in both templates
     * this is a bit tricky as one has to rename the fields if we use the same template two times.
     * here we don't user a clever algorithm to create dynamic fieldnames - this is left to the user..
View Full Code Here


    {
        Integer retval = null;
        COSNumber value = (COSNumber)page.getDictionaryObject( COSName.getPDFName( "Rotate" ) );
        if( value != null )
        {
            retval = new Integer( (int)value.intValue() );
        }
        return retval;
    }

    /**
 
View Full Code Here

        // add new page to kids entry in the pages dictionary
        COSArray kids = (COSArray) pages.getItem(COSName.getPDFName("Kids"));
        kids.add(destination.createObject(page));
        // and increase count
        COSNumber count = (COSNumber) pages.getItem(COSName.COUNT);
        pages.setItem(COSName.COUNT, new COSInteger(count.intValue() + 1));
    }
    /**
     * concat two pdf documents
     *
     * @param in1 The first template file
View Full Code Here

            {
                PDFOperator op = (PDFOperator)token;
                if( op.getOperation().equals( BEGIN_CODESPACE_RANGE ) )
                {
                    COSNumber cosCount = (COSNumber)tokens.get( i-1 );
                    for( int j=0; j<cosCount.intValue(); j++ )
                    {
                        i++;
                        COSString startRange = (COSString)tokens.get( i );
                        i++;
                        COSString endRange = (COSString)tokens.get( i );
View Full Code Here

                    }
                }
                else if( op.getOperation().equals( BEGIN_BASE_FONT_CHAR ) )
                {
                    COSNumber cosCount = (COSNumber)tokens.get( i-1 );
                    for( int j=0; j<cosCount.intValue(); j++ )
                    {
                        i++;
                        COSString inputCode = (COSString)tokens.get( i );
                        i++;
                        Object nextToken = tokens.get( i );
View Full Code Here

                    }
                }
               else if( op.getOperation().equals( BEGIN_BASE_FONT_RANGE ) )
                {
                    COSNumber cosCount = (COSNumber)tokens.get( i-1 );
                    for( int j=0; j<cosCount.intValue(); j++ )
                    {
                        i++;
                        COSString startCode = (COSString)tokens.get( i );
                        i++;
                        COSString endCode = (COSString)tokens.get( i );
View Full Code Here

    {
        Integer retval = null;
        COSNumber value = (COSNumber)page.getDictionaryObject( COSName.getPDFName( "Rotate" ) );
        if( value != null )
        {
            retval = new Integer( (int)value.intValue() );
        }
        return retval;
    }

    /**
 
View Full Code Here

    {
        Long retval = null;
        COSNumber value = (COSNumber)resources.getDictionaryObject( key );
        if( value != null )
        {
            retval = new Long( value.intValue() );
        }
        return retval;
    }

    /**
 
View Full Code Here

        long revision = ((COSNumber)encryptedDictionary.getDictionaryObject( COSName.getPDFName( "R" ) )).intValue();
        COSNumber cosLength = (COSNumber)encryptedDictionary.getDictionaryObject( COSName.getPDFName( "Length" ) );
        long length = 5;
        if( cosLength != null )
        {
            length = cosLength.intValue() / 8;
        }
        COSString id = (COSString)document.getDocumentID().get( 0 );
        COSString userPassword = (COSString)encryptedDictionary.getDictionaryObject( COSName.getPDFName( "U" ) );
        COSString ownerPassword = (COSString)encryptedDictionary.getDictionaryObject( COSName.getPDFName( "O" ) );
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.