1 31 package org.pdfbox.util.operator; 32 33 import java.util.List ; 34 import org.pdfbox.cos.COSNumber; 35 import org.pdfbox.util.Matrix; 36 import org.pdfbox.util.PDFOperator; 37 38 49 public class MoveText extends OperatorProcessor 50 { 51 52 57 public void process(PDFOperator operator, List arguments) 58 { 59 COSNumber x = (COSNumber)arguments.get( 0 ); 60 COSNumber y = (COSNumber)arguments.get( 1 ); 61 Matrix td = new Matrix(); 62 td.setValue( 2, 0, x.floatValue() ); td.setValue( 2, 1, y.floatValue() ); context.setTextLineMatrix( td.multiply( context.getTextLineMatrix() ) ); context.setTextMatrix( context.getTextLineMatrix().copy() ); 68 } 69 } 70 | Popular Tags |