Hello Luis, hello all,
> On 13 March 2018 at 00:49 Luis Otavio <masterdigi...@gmail.com> wrote: 
> Since PoDoFo seems to lack the ability to print multi line text into the 
> Justified format, and I am a newbie on PoDoFo 
> Id like the help of you guys to get a few information 
... snip ... 
> My questions are: 
> How do I get the length of a word in PDF units, or do i need to do it Glyph 
> by glyph? 
> Is there a better way to do that? 
as the PoDoFo method PdfPainter::DrawMultilineText() supports only left- and 
aligned  as well as centered text drawing, PdfFontMetrics::StringWidth() can be
used (get the font metrics from a font by PdfFont::GetFontMetrics()) to have the
width of a string calculated (be wary of those overloads taking const char*, the
encoding they expect is undocumented). However, this method mostly just sums up
the widths of the characters, only processing spaces as special, so kerning of 
character pairs/triplets is not taken into account. I hope this helps you 

> -- 
> Luis Otavio 

Best regards, mabri

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Podofo-users mailing list

Reply via email to