itext positioning text absolutely

前端 未结 5 1372
温柔的废话
温柔的废话 2020-12-03 17:00

In itext I have a chunk/phrase/paragraph (I dont mind which) and I want to position some where else on the page e.g. at 300 x 200. How would I do this?

5条回答
  •  醉话见心
    2020-12-03 17:42

    I did something along these lines, maybe it will help others:

    ColumnText ct = new ColumnText(writer.getDirectContent());
    ct.setSimpleColumn(left,bottom,right,top);
    ct.setText(new Phrase("String"));
    ct.go();
    

提交回复
热议问题