Anyone? How to draw wstring with polish characters on pdf file?

Best regards, 
Fryderyk

Od: frydery...@gmail.com
Wysłano: środa, 8 marca 2017 11:18
Do: Matthew Brincke; podofo-users@lists.sourceforge.net
Temat: ODP: [Podofo-users] polish chars to pdf

Hi, 
SO url with solution:
http://stackoverflow.com/questions/27928112/podofo-c-pdf-library-polish-characters

When im trying with ARIAL or TIMES NEW ROMAN fonts which should have polish 
chars, it shows me some strange signs instead of letters, but still dont have 
polish chars, know it as if I copy them and past somewhere else I got text, so 
it maybe problem with coding.

The method I use, is like you said, SetTest, SetModel, Draw. I’ve just did 
copy-paste to fast, sry.
I got update from Etienne Robin, as I was the one who got problem with reading 
this chars before 😊

Why so many problems with my lang? :D

Best regards, 
Fryderyk.


Od: Matthew Brincke
Wysłano: środa, 8 marca 2017 01:26
Do: podofo-users@lists.sourceforge.net
Temat: Re: [Podofo-users] polish chars to pdf

Hi,

I have some comments:

frydery...@gmail.com has written on 7 March 2017 at 13:00 CET:
> 
> Hi,
> 
> This time I got problem while drawing PdfString that contains
> polish signs to pdf file.
> 
> I found solution on SO, but it doesn't work for me.

Please give the question title and URL: Which one do you mean?

> 
> I do something like this:
> 
> const PdfEncoding* pEncoding = new PdfIdentityEncoding();
> 
> font = document.CreateFont("Times-Roman", false, false, pEncoding);

Please make sure the font contains the desired characters, supports Unicode
and is TrueType (for the identity encoding the latter is required AFAIK).

> 
> pNameTable.Draw(one_cm, page->GetPageSize().GetHeight() - one_cm,
> PdfString(reinterpret_cast("Ząb Łukasz"), painter);

This method doesn't exist in PoDoFo. Which one do you mean? The string would
come from the model (using PoDoFo::PdfSimpleTableModel::SetText() with such
a model, PdfTable::SetModel() to set it), with PdfTable::Draw(x, y, painter).

> 
> but I got only first letter of PdfString, in that case it’s ‘Z’
> 
> How can I solve this?

This probably the same problem as with reading from a PDF document (non-ASCII
chars, "signs", handled as '\0', ending the string). If you haven't already:
Please try the patches from Etienne Robin, he sent it 2017-02-15 10:50:04 UTC,
the mail subject is "Re: [Podofo-users] reading polish characters using PoDoFo",
the message ID: 5C9681C8-E3E0-453B-9533-B069B588F612%40iriscorporate.com,
the archive URL is: https://sourceforge.net/p/podofo/mailman/message/35667167/

Best regards, mabri

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users


------------------------------------------------------------------------------
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
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to