Dear All,
Thanks in advance for the help.
We are facing an issue with Arabic characters when using Podofo library to draw
it in PDF file.
The characters are not joined together in the output pdf file.
Below is the code that we have implemented to draw Arabic characters in PDF
file.
Attached the expected output and actual output snapshots.
Kindly let us know whether any other settings needs to be enabled or should we
use any other API.
...
pFont = document->CreateFont("Arabic Typesetting", false, false, false,
PdfEncodingFactory::GlobalIdentityEncodingInstance(),
PoDoFo::PdfFontCache::eFontCreationFlags_None);
painter.SetFont(pFont);
...
wstring ar = L"ابناء الشيخ";
std::reverse(ar.begin(), ar.end());
PdfString str1( ar.c_str() );
PdfString pString = str1.ToUnicode();
painter.AddText(pString, pString.GetCharacterLength());
...
Below are our observations regarding this issue.
1. Value of “pString” in the below line contains individual characters of the
Arabic string “ar”.
“PdfString pString = str1.ToUnicode();”
2. When “pString” is passed to “AddText” api, the output string written to PDF
document is not joined together.
Kindly refer to the attached expected output and actual output screenshots.
Regards,
Anand.
::DISCLAIMER::
________________________________
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only. E-mail transmission is not guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or may contain viruses in transmission.
The e mail and its contents (with or without referred errors) shall therefore
not attach any liability on the originator or HCL or its affiliates. Views or
opinions, if any, presented in this email are solely those of the author and
may not necessarily reflect the views or opinions of HCL or its affiliates. Any
form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written
consent of authorized representative of HCL is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any email and/or attachments, please check them for
viruses and other defects.
________________________________
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users