PDFTron SDK text file (*.txt) with Hebrew chars raise excpetion with convertion

94 views
Skip to first unread message

Danny Mendel

unread,
Aug 11, 2016, 5:29:27 PM8/11/16
to PDFTron PDFNet SDK
Exception:
Message: An error occurred while converting the file.
Detailed error:
Error converting text content using Text2PDF module.
Conditional expression: false
Filename : Convert.cpp
Function : trn::PDF::Convert::ToPdf
Linenumber : 1605

when execute
pdftron.PDF.Convert.ToXod(filename, outputPath_xod);
OR
pdftron.PDF.Convert.ToPdf(pdfdoc, filename);

BTW
Hebrew chars inside doc(x) to pdf/xod conversion works nicely!

Kindly help!
Many Many thanks
Danny

Ryan

unread,
Aug 11, 2016, 7:50:53 PM8/11/16
to PDFTron PDFNet SDK
Hi, can you send the file to support at pdftron.com, or post here if it is not confidential.

Danny Mendel

unread,
Aug 15, 2016, 8:42:21 PM8/15/16
to PDFTron PDFNet SDK
sure
all those text files includes hebrew chars
even if one char is in hebrew (in mixed english / heb content)
the internal pdftron txt parser will complain:)

many thanks
Danny
פיטורין דוד בלאט.txt
החזרי מס עם סוכנים.txt
דןדן.txt

Renchen Sun

unread,
Aug 17, 2016, 3:42:42 PM8/17/16
to PDFTron PDFNet SDK
Hello Danny,


It turns out that the encoding for these files are `Hebrew - Windows 1255` which we currently don't support unfortunately. That's why PDFNet complains because in our old sdk, only UTF encoding is accepted when converting text to pdf.

If you can try our latest nightly builds with utf-encoded files, the problem should be resolved.  I have attached a utf-8 version of one of the attachments you sent in this email. Feel free to give it a try using our latest nightly builds.

Please let me know if this works for you, and if you have any further questions.



Regards,
Renchen
החזרי מס עם סוכנים(1).txt

Danny Mendel

unread,
Aug 18, 2016, 6:28:23 PM8/18/16
to PDFTron PDFNet SDK
i tried your latest experimental - PDFNetDotNet4_2016-08-18_stable_rev47484.zip
it has been manage to show hebrew chars, but not as normal RTL - Bi-Directional
but as Jebreish (LTR words - unreadable)

attached a compare of ur original heb utf vs your converted result with latest nightly build

Danny
hebutf_orig_vs_converted.png

Renchen Sun

unread,
Aug 18, 2016, 6:41:42 PM8/18/16
to PDFTron PDFNet SDK
Hello Danny,


Thanks for your feedbacks.

Text2PDF module doesn't support bidi language layout, however, it's in our list of todos. We are looking into adding this support in a future release. 


Thank you.

Renchen

On Thursday, August 11, 2016 at 2:29:27 PM UTC-7, Danny Mendel wrote:
Reply all
Reply to author
Forward
0 new messages