Aspose issue with 5.3.0

Hi Team,



Please see the attached PDF samples for the Chinese language. All these
are from the version 5.3.0 version for Aspose dll for .Net



Chinese_content.png: shows the Chinese text wrapping into multiple lines
even though there is sufficient space available in the same line.

Chinese_toc.png: shows the in case of headline TOC, the characters are
not visible properly. Not sure how was this in the older versions.



Please try to solve these issues on a priority.



Regards

Venkat

Hello Venkat,

Thanks for using our products.

We are working over this query and will get back to you soon. We are sorry for this inconvenience.

Hello Venkat,

Thanks for your patience.

I have tested both the scenarios using Aspose.Pdf for .NET 5.3.0 and I am unable to notice any problems. I have used the following code snippets to test the scenarios and the resultant PDF's that I have generated are also in attachment. Please take a look.

Code for Chinese Text wrap scenario

[C#]

//Instantiate Pdf pbject by calling its empty constructor
Aspose.Pdf.Pdf pdf1 = new Aspose.Pdf.Pdf();
//Create a new section in the Pdf object
Aspose.Pdf.Section sec1 = pdf1.Sections.Add();
//Create a new text paragraph and pass the text to its constructor as argument
Aspose.Pdf.Text t2 = new Aspose.Pdf.Text("人人生而自由﹐(google) 在尊嚴和權利上一律平等。 他們賦有理性和良心﹐並應以兄弟關係的精神互相對待");
// add text paragraph to paragraphs collection of section object
sec1.Paragraphs.Add(t2);
// auto adjust the font according to its information
pdf1.IsAutoFontAdjusted = true;
// save the resultant PDF
pdf1.Save(@\\134.132.109.102\data\test.Pdf);

Code for Table Of Contents and Bookmark scenario

[C#]

// create PDF document object
Pdf pdf = new Pdf();
// headings in a PDF should be Bookmarked
pdf.IsBookmarked = true;
pdf.BookmarkLevel = 2;

//Create a list section
ListSection tocSection = new ListSection("Table Of Contents 在尊嚴和上。");
//Set its list type as table of of contents
tocSection.ListType = ListType.TableOfContents;
//Add the list section to the sections collection of the Pdf document
pdf.Sections.Add(tocSection);

//Define the format of the four levels list by setting the left margins and
//text format settings of each level
tocSection.ListFormatArray.Length = 4;
tocSection.ListFormatArray[0].LeftMargin = 0;
tocSection.ListFormatArray[0].TextInfo.IsTrueTypeFontBold = true;
tocSection.ListFormatArray[0].TextInfo.IsTrueTypeFontItalic = true;
tocSection.ListFormatArray[1].LeftMargin = 10;
tocSection.ListFormatArray[1].TextInfo.IsUnderline = true;
tocSection.ListFormatArray[1].TextInfo.FontSize = 10;
tocSection.ListFormatArray[2].LeftMargin = 20;
tocSection.ListFormatArray[2].TextInfo.IsTrueTypeFontBold = true;
tocSection.ListFormatArray[3].LeftMargin = 30;
tocSection.ListFormatArray[3].TextInfo.IsTrueTypeFontBold = true;

//Create a section in the Pdf document
Aspose.Pdf.Section sec1 = pdf.Sections.Add();
//Add four headings in the section
for (int Level = 1; Level != 4; Level++)
{
Heading heading2 = new Heading(pdf, sec1, Level);
Segment segment2 = new Segment(heading2);
heading2.Segments.Add(segment2);
heading2.IsAutoSequence = true;
segment2.Content = "人人生而自由﹐(google) 在尊嚴和權利上一律平等";
segment2.Content += Level.ToString();
//Add the heading into Table Of Contents.
heading2.IsInList = true;
sec1.Paragraphs.Add(heading2);
}

pdf.IsAutoFontAdjusted = true;
// save the resultant PDF
pdf.Save("d:/pdftest/TableOfContents-Chinese.pdf");

Can you please share some further details on how we can reproduce these problems. We apologize for your inconvenience.