pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ridao Freitas <i...@ivanrf.com>
Subject Text overlap
Date Mon, 09 May 2016 00:30:44 GMT
Hi, I'm designing an invoice with PDFBox. The only doubt I have is how 
to control text overlapping?
For example, if one line has a text at (x=10) and another at (x=100), 
how can I prevent the first text to overlap the second one.
I'm adding text with:
         content.beginText();
         content.newLineAtOffset(x, y);
         content.showText(text);
         content.endText();

I know how to calculate the string width and I could cut it until it 
fits, but is that the only approach?
Should I consider inserting a form field and then set the text to a 
PDTextField?

Thanks,
Ivan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message