I have text 开发者_如何学编程with font in org.faceless.pdf.PDFFont. How can I get width of it in px?
Thanks.
If you mean how to get the width in points (pixels don't really apply in PDF) then you can create a PDFStyle with that font and call PDFStyle.getTextLength() or PDFStyle.getTextWidths().
In general, if you have support questions for the BFO PDF Library please drop us an email at support at bfo.co.uk - that's what we're there for. All our contact details are at http://bfo.co.uk/contact.jsp.
Cheers... Mike @ BFO
精彩评论