Hello Nicola, Please upload your PDF to a sharehoster, attachments are removed.
showTextWithPositioning is for horizontal positioning of individual glyphs, it is the "way to specify a string with some, I don't know, offset between the chars". (or vertical, if it is a vertical font) it might be tricky if you are using a propotional font. Please explain "but the output was not the one I need" - what happened / what did you expect to happen?
I'm also wondering whether the PDF is an acroform document, what might make things easier.
Tilman On 31.01.2024 15:07, Nicola Farina wrote:
Hi I need to produce a kind of form filled document like the attached one. My application receives a print request payload with all the fields of a kind of "payment postal order". Then a PDF document, containing the layout, is loaded. Then I fill it using PDFBox primitives, basically a sequence of: newLineAtOffset followed by showText In the attached example, though, there is a new requirement. There are some areas (I have encircled in red to better identify them) which I need to place a string whose characters must be inside boxes. I tried to use showTextWithPositioning preparing an array with each character followed by a number representing the interleaving space, but the output was not the one I need. Do I need to manually position each character and then move the cursor explicitly? Is there no way to specify a string with some, I don't know, offset between the chars? thanks! Bye Nicola --------------------------------------------------------------------- To unsubscribe, e-mail:users-unsubscr...@pdfbox.apache.org For additional commands, e-mail:users-h...@pdfbox.apache.org