Hi,

I'm trying to use PoDoFo in my current project but I have a small issue.
I'm using UTF-8 text and different locales. The text contains special
characters like őű.

PdfPainter::DrawTextAligned is working fine but
PdfPainter::DrawMultiLineText is not.
When the string doesn't contain any special character DrawMultiLineText is
ok but when it does DrawMultiLineText simply doesn't draw anything.
I've checked GetMultiLineTextAsLines and it returns 0 in this case.

I create a PdfFont like this:
PdfFont* pdfFont = document.CreateFont( "Arial", true, false, new
PdfIdentityEncoding( 0, 0xffff, true ) );
painter.SetFont( pdfFont );

It's working fine:
painter.DrawTextAligned( leftMargin, topMargin, 100.0, PdfString(
reinterpret_cast<const pdf_utf8*>( str.c_str() ) ), ePdfAlignment_Left );

It's not:
painter.DrawMultiLineText( leftMargin, topMargin, 100.0, 60.0,
PdfString(reinterpret_cast<const pdf_utf8*>( str.c_str() )),
PdfAlignment_Center, ePdfVerticalAlignment_Center );

(str is an std::string and contains an UTF-8 text with special characters)

Have I done something wrong?

Thanks.
Adam
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to