Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSInteger


     *
     * @param ff The new value for the "clear widget field flags".
     */
    public void setClearWidgetFieldFlags( Integer ff )
    {
        COSInteger value = null;
        if( ff != null )
        {
            value = COSInteger.get( ff );
        }
        field.setItem( "ClrF", value );
View Full Code Here


            if( pbo instanceof COSObject )
            {
                // We have to check if the expected values are there or not PDFBOX-385
                if (po.get(po.size()-1) instanceof COSInteger)
                {
                    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

    @Override
    protected void setUp() throws Exception
    {
        this.node5 = new PDNameTreeNode(COSObject.class);
        SortedMap<String, COSObject> names = new TreeMap<String, COSObject>();
        COSInteger i = COSInteger.get(89);
        names.put("Actinium", new COSObject(i));
        names.put("Aluminum", new COSObject(COSInteger.get(13)));
        names.put("Americium", new COSObject(COSInteger.get(95)));
        names.put("Antimony", new COSObject(COSInteger.get(51)));
        names.put("Argon", new COSObject(COSInteger.get(18)));
View Full Code Here

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

     *
     * @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

            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

            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 );
                if(log.isDebugEnabled())
                {
                    log.debug( "parsed=" + object );
View Full Code Here

    * @throws IOException
    */
    private void addObjectToConflicts(int offset, COSObjectKey key, COSBase pb) throws IOException
    {
        COSObject obj = new COSObject(null);
        obj.setObjectNumber( new COSInteger( key.getNumber() ) );
        obj.setGenerationNumber( new COSInteger( key.getGeneration() ) );
        obj.setObject(pb);
        ConflictObj conflictObj = new ConflictObj(offset, key, obj);
        conflictList.add(conflictObj);  
    }
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.