Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSNumber


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


     * @return The value for that item.
     */
    private Float getFloatItem( COSName key )
    {
        Float retval = null;
        COSNumber value = (COSNumber) dict.getDictionaryObject( key );
        if( value != null )
        {
            retval = value.floatValue();
        }
        return retval;
    }
View Full Code Here

            //a wrong number of arguments to this, so we will assume the last argument
            //in the list
            Object charSpacing = arguments.get(arguments.size()-1);
            if(charSpacing instanceof COSNumber)
            {
                COSNumber characterSpacing = (COSNumber)charSpacing;
                context.getGraphicsState().getTextState().setCharacterSpacing(characterSpacing.floatValue());
            }
        }
    }
View Full Code Here

public class SetTextHorizontalScaling extends OperatorProcessor
{
    @Override
    public void process(Operator operator, List<COSBase> arguments) throws IOException
    {
        COSNumber scaling = (COSNumber)arguments.get(0);
        context.getGraphicsState().getTextState().setHorizontalScaling(scaling.floatValue());
    }
View Full Code Here

{
    @Override
    public void process(Operator operator, List<COSBase> arguments) throws IOException
    {
        //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);
    }
View Full Code Here

public class MoveText extends OperatorProcessor
{
    @Override
    public void process(Operator operator, List<COSBase> arguments)
    {
        COSNumber x = (COSNumber)arguments.get( 0 );
        COSNumber y = (COSNumber)arguments.get( 1 );
        Matrix td = new Matrix();
        td.setValue( 2, 0, x.floatValue() );
        td.setValue( 2, 1, y.floatValue() );
        context.setTextLineMatrix( td.multiply( context.getTextLineMatrix() ) );
        context.setTextMatrix( context.getTextLineMatrix().clone() );
    }
View Full Code Here

public class SetLineWidth extends OperatorProcessor
{
    @Override
    public void process(Operator operator, List<COSBase> arguments) throws IOException
    {
        COSNumber width = (COSNumber)arguments.get( 0 );
        context.getGraphicsState().setLineWidth( width.floatValue() );
    }
View Full Code Here

{
    @Override
    public void process(Operator operator, List<COSBase> operands) throws IOException
    {
        // append straight line segment from the current point to the point
        COSNumber x = (COSNumber)operands.get(0);
        COSNumber y = (COSNumber)operands.get(1);

        Point2D pos = context.transformedPoint(x.doubleValue(), y.doubleValue());
        context.lineTo((float) pos.getX(), (float) pos.getY());
    }
View Full Code Here

public class SetWordSpacing extends OperatorProcessor
{
    @Override
    public void process(Operator operator, List<COSBase> arguments)
    {
        COSNumber wordSpacing = (COSNumber)arguments.get( 0 );
        context.getGraphicsState().getTextState().setWordSpacing( wordSpacing.floatValue() );
    }
View Full Code Here

public class SetTextLeading extends OperatorProcessor
{
    @Override
    public void process(Operator operator, List<COSBase> arguments)
    {
        COSNumber leading = (COSNumber)arguments.get( 0 );
        context.getGraphicsState().getTextState().setLeading( leading.floatValue() );
    }
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.cos.COSNumber

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.