About Aspose.Pdf.Generator and IsUnicode Property

Hi,
I just upgraded to the 18.1 from version 16.11. Aspose.Pdf.Generator was removed. My new and old code block like below. And i couldn’t found “IsUnicode” property. I used “IsEmbedded” property. Am i right?
Can you check code blocks?

Old version;

            Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();
            Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add();
            Aspose.Pdf.Generator.Text text1 = new Aspose.Pdf.Generator.Text(sec1);
            sec1.Paragraphs.Add(text1);

            Aspose.Pdf.Generator.Segment s1 = new Aspose.Pdf.Generator.Segment(pMessage);
            s1.TextInfo.FontName = "Arial";
            s1.TextInfo.FontSize = 16;
            s1.TextInfo.Color = new Aspose.Pdf.Generator.Color("Red");
            s1.TextInfo.IsUnicode = true;
            text1.Segments.Add(s1);

New version;

            Aspose.Pdf.Document pdf1 = new Aspose.Pdf.Document();
            Aspose.Pdf.Page sec1 = pdf1.Pages.Add();
            Aspose.Pdf.Text.TextFragment text1 = new Aspose.Pdf.Text.TextFragment();
            sec1.Paragraphs.Add(text1);

            Aspose.Pdf.Text.TextSegment s1 = new Aspose.Pdf.Text.TextSegment(pMessage);
            s1.TextState.Font = Aspose.Pdf.Text.FontRepository.FindFont("Arial");
            s1.TextState.FontSize = 16;
            s1.TextState.ForegroundColor = Aspose.Pdf.Color.Red;
            s1.TextState.Font.IsEmbedded = true;
            text1.Segments.Add(s1);

Thanks for your help.

@zelihaserbez

Thanks for your inquiry.

The IsUnicode property was used to render non-English characters/contents inside PDF document and to embed true type font inside PDF in old Generator model. Whereas, this feature is supported in new DOM model by default and you can add non-English characters inside PDF without specifying any property for TextFragment. Furthermore, IsEmbedded Property is used to embed fonts with PDF document. In event of any further query, please feel free to ask.