Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSInteger


     *
     * @param h The height of the image.
     */
    public void setHeight( int h )
    {
        dictionary.setItem( COSName.getPDFName( "H" ), new COSInteger( h ) );
    }
View Full Code Here


     *
     * @param w The width of the image.
     */
    public void setWidth( int w )
    {
        dictionary.setItem( COSName.getPDFName( "W" ), new COSInteger( w ) );
    }
View Full Code Here

            int objectCounter = 0;
            while( (cosObject = parseDirObject()) != null )
            {
                object = new COSObject(cosObject);
                object.setGenerationNumber( COSInteger.ZERO );
                COSInteger objNum =
                    new COSInteger( ((Integer)objectNumbers.get( objectCounter)).intValue() );
                object.setObjectNumber( objNum );
                streamObjects.add( object );
                objectCounter++;
            }
        }
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

    public PDPageNode()
    {
        page = new COSDictionary();
        page.setItem( COSName.TYPE, COSName.PAGES );
        page.setItem( COSName.KIDS, new COSArray() );
        page.setItem( COSName.COUNT, new COSInteger( 0 ) );
    }
View Full Code Here

            {
                PDPageNode node = (PDPageNode)next;
                totalCount += node.updateCount();
            }
        }
        page.setItem( COSName.COUNT, new COSInteger( totalCount ) );
        return totalCount;
    }
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

            fontWidth = fontWidthF.floatValue();
        }
        else
        {
            //hmm should this be in a subclass??
            COSInteger firstChar = (COSInteger)font.getDictionaryObject( COSName.FIRST_CHAR );
            COSInteger lastChar = (COSInteger)font.getDictionaryObject( COSName.LAST_CHAR );
            if( firstChar != null && lastChar != null )
            {
                long first = firstChar.intValue();
                long last = lastChar.intValue();
                if( code >= first && code <= last && font.getDictionaryObject( COSName.WIDTHS ) != null )
                {
                    COSArray widthArray = (COSArray)font.getDictionaryObject( COSName.WIDTHS );
                    COSNumber fontWidthObject = (COSNumber)widthArray.getObject( (int)(code - first) );
                    fontWidth = fontWidthObject.floatValue();
View Full Code Here

     *
     * @param page The page number.
     */
    public void setPage( int page )
    {
        annot.setItem( "Page", new COSInteger( page ) );
    }
View Full Code Here

     *
     * @param dw The default width.
     */
    public void setDefaultWidth( long dw )
    {
        font.setItem( COSName.getPDFName( "DW" ), new COSInteger( dw ) );
    }
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.