Here is a sample java code showing how to add a multi-line text stamp to a PDF document using  jPDFProcess publis API. This will automatically add a rounded corner around the text.

Approved Stamp With Date and By

In this case, we’re creating a stamp that reads “Approved ” on the first line and has the current date on the second line.

You can customize the text, color and date format.

PDFDocument doc = new PDFDocument("C:/test/alphabets.pdf", null);
// create a new multiline text stamp with static text and the current time
String stampText = "Approved" + "\n" + DateFormat.getDateTimeInstance().format(new Date() + \n "By John Smith");
RubberStamp stamp = doc.getAnnotationFactory().createRubberStamp(stampText,;
// by default the stamp is placed in the upper left corner - add some margins
stamp.setRectangle(new Rectangle2D.Double(100, 100, stamp.getRectangle().getWidth(), stamp.getRectangle().getHeight()));
// add the stamp to the page
// save the document

Download Full Java Sample