Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSInteger


        COSDictionary pages = new COSDictionary();
        rootDictionary.setItem( COSName.PAGES, pages );
        pages.setItem( COSName.TYPE, COSName.PAGES );
        COSArray kidsArray = new COSArray();
        pages.setItem( COSName.KIDS, kidsArray );
        pages.setItem( COSName.COUNT, new COSInteger( 0 ) );
    }
View Full Code Here


            {
                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 ) ) );
                }
            }
        }
View Full Code Here

             * If Index doesn't exist, we will use the default values.
             */
            if(indexArray == null)
            {
                indexArray = new COSArray();
                indexArray.add(new COSInteger(0));
                indexArray.add(stream.getDictionaryObject("Size"));
            }
           
            ArrayList objNums = new ArrayList();
           
View Full Code Here

            while( (amountRead = input.read(buffer,0,1024)) != -1 )
            {
                getStandardOutput().write( buffer, 0, amountRead );
                totalAmountWritten += amountRead;
            }
            lengthObject.setObject( new COSInteger( totalAmountWritten ) );
            getStandardOutput().writeCRLF();
            getStandardOutput().write(ENDSTREAM);
            getStandardOutput().writeEOL();
            return null;
        }
View Full Code Here

     *
     * @param rotation The new rotation for this page.
     */
    public void setRotation( int rotation )
    {
        page.setItem( COSName.ROTATE, new COSInteger( rotation ) );
    }
View Full Code Here

        if( namesArray != null )
        {
            indices = new HashMap();
            for( int i=0; i<namesArray.size(); i+=2 )
            {
                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

            Collections.sort( keys );
            COSArray array = new COSArray();
            for( int i=0; i<keys.size(); i++ )
            {
                Integer key = (Integer)keys.get(i);
                array.add( new COSInteger( key.intValue() ) );
                COSObjectable obj = (COSObjectable)numbers.get( key );
                array.add( obj );
            }
            Integer lower = null;
            Integer upper = null;
View Full Code Here

    {
        COSDictionary dict = new COSDictionary();
        COSArray arr = new COSArray();
        for (Entry<Integer, PDPageLabelRange> i : labels.entrySet())
        {
            arr.add(new COSInteger(i.getKey()));
            arr.add(i.getValue());
        }
        dict.setItem("Nums", arr);
        return dict;
    }
View Full Code Here

    public PDIndexed()
    {
        array = new COSArray();
        array.add( COSName.getPDFName( NAME ) );
        array.add( COSName.getPDFName( PDDeviceRGB.NAME ) );
        array.add( new COSInteger( 255 ) );
        array.add( org.apache.pdfbox.cos.COSNull.NULL );
    }
View Full Code Here

     *
     * @param high The highest value for the lookup table.
     */
    public void setHighValue( int high )
    {
        array.set( 2, new COSInteger( high ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.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.