I am creating a pdf document from scratch. So there is no source pdf document.
I had the fragment of source code that creates the text fragment and sets the texts background above. Hre it is again:
TextFragment sbecHeading = new TextFragment(“PURCHASE REQUISITION”);
sbecHeading.setPosition(new Position(leftMargin + 220, pageHeight - 75));
I figured a solution. I put a space after the last character and it covered it.
TextFragment sbecHeading = new TextFragment(“PURCHASE REQUISITION ”);
I hope I am being clear enough. And if I am, will you be able to tell me why does it not cover the whole text fragment and with the background color?