Skip to content

ITextSharp Convert Html to PDF Not Display greek Words in HTML

hardik ramwani

Asked Nov 9, 2012, 8:29 PM EST1 answer
Share
LinkedInX
Hello,

I have implemented HTML Page With greek words.
It is shown in browser but while i am parsing in PDF with help of iTextSharp showes Blank in place of greek words.

Kindly Provide any solution for this problem. Its urgent.....

Thanks Regards
Hardik Ramwani

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Not sure if the problem is with a HTML file or with iTextSharp.
    Nevertheless what I would do is check the used font in your HTML file, does that font family support does characters?
    Also check the file's meta tag or encoding, is it specified correctly?
    If everything is ok then the problem is probably with the iText, so maybe you could try some alternative, for example this C# component for Word.
    Just use this:
    Code
    DocumentModel document = DocumentModel.Load("Path to your HTML input file!");
    document.Save("Path to your PDF output file!");
    That is all that is needed for converting a HTML file into a PDF in C#.
    Another thing, you can see how to export a PDF file in ASP.NET, I believe you'll find that useful as well.
    0