Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to write text in an arc shape using iText

I want to write some text in the arc shape as shown in the image.

Does iText for java provides some functionality to do this?Any help would be appreciated.

enter image description here

like image 941
harsh Avatar asked Nov 12 '22 02:11

harsh


1 Answers

There's no direct way to do that with iText. However, with some simple math, you can define the path, and then the position and angle of each letter. Then, use this example (taken from the iText in Action book) as an inspiration on how to draw each character at the desired position/angle.

like image 129
Alexis Pigeon Avatar answered Nov 14 '22 23:11

Alexis Pigeon