On Fri, Oct 30, 2020 at 8:50 AM Dmytro Tristan <tristan.mi...@outlook.com>
wrote:

>
>
> Dear Peter and Michal,
>
>
You probably mistakenly sent this only to me so I am returning it to the
mailing list.


> What I did so far:
> I have downloaded and built the latest version of podofo from trunk (as
> far as I'm undestand trunk is the most updated branch);
>

Is it the latest revision r2016 from 2020-10-10? I am suggesting to double
check whether you are really linking with the version of podofo which you
compiled instead of some old version from your system.

Tried draw text with another fonts;
> Result is the same.
>
> Maybe the issue is in my code. Could you please look on some parts of it?
>
> Here is my code for font creation:
>
> m_specialFont = m_doc.CreateFont("Arial Nova Cond-Bold", false, false,
> false,
>
>                                      
> PdfEncodingFactory::GlobalWinAnsiEncodingInstance(),
>
>                                      PdfFontCache::eFontCreationFlags_None, 
> true,
>
>                                      specialFontPath.string().c_str());
>
>
>
> generalFontPath.append(Config::instance().specialTextFontFile());
>
>     m_generalFont = m_doc.CreateFont("Arial Nova Cond", false, false, false,
>
>                                      
> PdfEncodingFactory::GlobalIdentityEncodingInstance(),
>
>                                      PdfFontCache::eFontCreationFlags_None, 
> true,
>
>                                      generalFontPath.string().c_str());
>
>
> And I draw text with
>
> painter.DrawMultiLineText(textPosX, textPosY, textWidth, textHeight,
>
>                                   std::get<1>(m_text).c_str(),//std::wstring 
> here!!!! But I have tried with PdfString also
>
>                                   static_cast<EPdfAlignment>(horAlignment), 
> static_cast<EPdfVerticalAlignment>(verAlignment));
>
>
>
I never tried these wstring APIs so I cannot confirm whether they are
working. Did you try to simply use a normal char string?


> Thank you for your help and time.
>
> Mitia Tristan
>
>
>
> ------------------------------
> *From:* Peter Bozek <peter.bo...@gmail.com>
> *Sent:* Thursday, October 29, 2020 12:31
> *To:* Dmytro Tristan <tristan...@outlook.com>
> *Cc:* Michal Sudolsky <sudols...@gmail.com>; podofo-us...@lists.sf.net <
> podofo-us...@lists.sf.net>
> *Subject:* Re: [Podofo-users] IdentityEncoding issue with Cyrillic
> alphabet
>
> On Thu, Oct 29, 2020 at 10:13 AM Dmytro Tristan <tristan...@outlook.com>
> wrote:
> >
> > I’m not sure that I have explained correctly. I use version 0.9.6.
> Previous ones I have mentioned as examples of issues I have found. Am I
> understand correctly that I should try to CreateFontSubset?
>
> This was a problem of older version - 0,9,4 for sure. When you used
> identity encoding, which you had to when various scripts (cyrilic /
> latin) was used, included font did not contain width table, resulting
> in garbage.
>
> There is a discussion re identity encoding on the list, the problem
> was fixed few years ago, so try to get last version of PoDoFo.
>
> Regards,
>
> Peter Bozek
>
> >
> > Thank you.
> >
> >
> > Best,
> >
> > Mitia
> >
> > Sent from my IPhone
> > ________________________________
> > От: Michal Sudolsky <sudols...@gmail.com>
> > Отправлено: Wednesday, October 28, 2020 10:55:22 PM
> > Кому: Dmytro Tristan <tristan...@outlook.com>
> > Копия: podofo-us...@lists.sf.net <podofo-us...@lists.sf.net>
> > Тема: Re: [Podofo-users] IdentityEncoding issue with Cyrillic alphabet
> >
> >
> >
> > On Wed, Oct 28, 2020 at 7:15 AM Dmytro Tristan <tristan...@outlook.com>
> wrote:
> >
> > Hi Guys,
> >
> > I'm waiving an issue with drawing Cyrillic text in pdf document, which i
> create using PdfStreamedDocument class.
> >
> > I searched via mailing list archive and had found couple similar threads.
> > First (
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fpodofo%2Fmailman%2Fmessage%2F36872812%2F&amp;data=04%7C01%7C%7C16ec916579254cc1880608d87bf5c168%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637395642718051123%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=l0wsCEfZRTZlvf32RSv5ucfy4fuzunmLAUoy0fvfAzA%3D&amp;reserved=0)
> propose to build and install version from trunk, what I had tried, but i
> think solution is outdated as trunk was updated since then.
> >
> >
> > No, it is not outdated. For a truetype font subset is needed to be used
> CreateFontSubset with some newer podofo in which it is working. I
> personally doubt that anyone will try to fix old versions of podofo.
> Looking at your pdf the problem is probably due to missing some pdf font
> structures compared to a pdf generated by the latest podofo and font is
> probably treated as if it has single-byte encoding and effect of this are
> these mentioned extra spaces.
> >
> > Second (
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fpodofo%2Fmailman%2Fmessage%2F36238386%2F&amp;data=04%7C01%7C%7C16ec916579254cc1880608d87bf5c168%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637395642718061117%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UPs1yCuA5%2FMGsXxp9bfmu26C5Gl0wv0JKjfu9deuxko%3D&amp;reserved=0)
> basically shows that issue starts from 0.9.4 version. I had tested that
> with 0.9.3 and can confirm that in last one issue is not reproduced.
> >
> > The problem is that when I create font with Identity encoding the text
> prints with extra space between characters, the same as in mentioned
> threads. Like [l i k e] (no matter Cyrillic or Latin characters). I enclose
> example of PDF. In this PDf I use two fonts - Arial Nova Cond and Arial
> Nova Cond-Bold. First created with Identity encoding, the second with
> WinAnsiEncoding.
> >
> >
> > I have tried different fonts with different encoding, the Cyrillic
> character either is not printed at all, either all text is printed with
> spaces;
> >
> > The obvious way is to check what was changed when upgrading to 0.9.4 and
> had did that, but there are a lot of changes and I do not know even where
> to start digging.
> >
> > Will appreciated any help with this issue.
> >
> > Thank you.
> >
> > Mitia Tristan
> >
> >
> > _______________________________________________
> > Podofo-users mailing list
> > Podofo-users@lists.sourceforge.net
> >
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fpodofo-users&amp;data=04%7C01%7C%7C16ec916579254cc1880608d87bf5c168%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637395642718600816%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=RjfnJuB2isl4AQRfmXquqXVWerLbuoTeqMxw%2Fimmp5I%3D&amp;reserved=0
> >
> > _______________________________________________
> > Podofo-users mailing list
> > Podofo-users@lists.sourceforge.net
> >
> https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fpodofo-users&amp;data=04%7C01%7C%7C16ec916579254cc1880608d87bf5c168%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637395642718600816%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=RjfnJuB2isl4AQRfmXquqXVWerLbuoTeqMxw%2Fimmp5I%3D&amp;reserved=0
>
>
>
> --
> --
>
> Peter Bozek
>
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to