Subject: PDF encoding
Date: 2015-11-23 14:41:14
From: kfir irani
Source: pdf-encoding
----------------------------------------------------------------------

Hi,

I'm having problem with Hebrew encoding in pdf form

Here's my generated PDF - https://s3.amazonaws.com/nf_forms/6/FilledForms/79323121-edfc-457c-993e-590513846e3a.pdf

When opening this file from foxit reader everything looks ok, but when opening it from chrome using PDF App, the the Hebrew letters looks in gibberish 
Here's my code - 

        private void fillPDFForm(string pdfTemplateUrl, string newFile)

        {

 

            using (PdfImportedDocument doc = new PdfImportedDocument(new MemoryStream(new WebClient().DownloadData(pdfTemplateUrl))))

            {

 

 

                PdfImportedForm form = doc.Form;

                foreach (var field in form.Fields)

                {

                    if (field is PdfImportedTextBoxField)

                    {

                        (field as PdfImportedTextBoxField).Text = "שלום לכם ילדים וילדות";

                    }

                }

                

                doc.Save(newFile);

            }

 

        }

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index