Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSNumber.floatValue()


                {
                    COSArray array = (COSArray) next;
                    for (int j = 0; j < array.size(); j++)
                    {
                        COSNumber width = (COSNumber) array.get(j);
                        totalWidths += width.floatValue();
                        characterCount += 1;
                    }
                }
                else
                {
View Full Code Here


                }
                else
                {
                    i++;
                    COSNumber rangeWidth = (COSNumber) widths.getObject(i);
                    if (rangeWidth.floatValue() > 0)
                    {
                        totalWidths += rangeWidth.floatValue();
                        characterCount += 1;
                    }
                }
View Full Code Here

                {
                    i++;
                    COSNumber rangeWidth = (COSNumber) widths.getObject(i);
                    if (rangeWidth.floatValue() > 0)
                    {
                        totalWidths += rangeWidth.floatValue();
                        characterCount += 1;
                    }
                }
            }
        }
View Full Code Here

     * @return The min value.
     */
    public float getMin()
    {
        COSNumber min = (COSNumber)rangeArray.getObject( startingIndex*2 );
        return min.floatValue();
    }

    /**
     * This will set the minimum value for the range.
     *
 
View Full Code Here

     * @return The max value.
     */
    public float getMax()
    {
        COSNumber max = (COSNumber)rangeArray.getObject( startingIndex*2+1 );
        return max.floatValue();
    }

    /**
     * This will set the maximum value for the range.
     *
 
View Full Code Here

    {
        Float retval = null;
        COSNumber value = (COSNumber) dict.getDictionaryObject( key );
        if( value != null )
        {
            retval = value.floatValue();
        }
        return retval;
    }

    /**
 
View Full Code Here

{
    @Override
    public void process(Operator operator, List<COSBase> arguments) throws IOException
    {
        COSNumber rise = (COSNumber)arguments.get(0);
        context.getGraphicsState().getTextState().setRise( rise.floatValue() );
    }

    @Override
    public String getName()
    {
View Full Code Here

            //in the list
            Object charSpacing = arguments.get(arguments.size()-1);
            if(charSpacing instanceof COSNumber)
            {
                COSNumber characterSpacing = (COSNumber)charSpacing;
                context.getGraphicsState().getTextState().setCharacterSpacing(characterSpacing.floatValue());
            }
        }
    }

    @Override
View Full Code Here

{
    @Override
    public void process(Operator operator, List<COSBase> arguments) throws IOException
    {
        COSNumber scaling = (COSNumber)arguments.get(0);
        context.getGraphicsState().getTextState().setHorizontalScaling(scaling.floatValue());
    }

    @Override
    public String getName()
    {
View Full Code Here

    {
        //move text position and set leading
        COSNumber y = (COSNumber)arguments.get(1);

        ArrayList<COSBase> args = new ArrayList<COSBase>();
        args.add(new COSFloat(-1 * y.floatValue()));
        context.processOperator("TL", args);
        context.processOperator("Td", arguments);
    }

    @Override
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.