How to set 'Use Asian rules for controlling first and last characters' in a textbox?

I am looking for ‘Use Asian rules for controlling first and last characters’ setting in Aspose.Cells.Drawing.Texts. I assumed that it could be in TextParagraph class but not found in there.
Would you kindly help me to find it?

Thank you.

@AT1
Would you like to provide your sample file and test code? If you could take a screenshot and highlight your requirements, it would be very helpful for us to locate the problem. We will check it soon.

Thank you very much for your reply.
Please find the attached, this setting is what I’m looking for.

image.png (20.2 KB)

@AT1
Please refer to TextParagraph.IsEastAsianLineBreak property. If you have any further questions, please send us the runnable code for further analysis. Thank you!

Thank you very much for your reply.
I tried the code below but no success yet. In the print preview ‘。’ still comes at the beginning of the 2nd line.
Please find attached for the details.
Aspose Textbox.pdf (24.8 KB)

I’m using Aspose.Cells v22.30, if this works well in another version please kindly let me know.

        using Workbook workbook = new Workbook();
        Worksheet worksheet = workbook.Worksheets.First();

        int textboxIndex = worksheet.TextBoxes.Add(1, 1, 60, 235);
        TextBox textbox = worksheet.TextBoxes[textboxIndex];
        textbox.IsTextWrapped = true;
        textbox.Text = "こんにちは、今日はいい天気です。";

        foreach(TextParagraph p in textbox.TextBody.TextParagraphs)
        {
            p.Font.Name = "MS Gothic";
            p.IsEastAsianLineBreak = true;
        }

        MemoryStream stream = new MemoryStream();
        workbook.Save(stream, SaveFormat.Xlsx);
        stream.Seek(0, SeekOrigin.Begin);

        string filename = "test.xlsx";
        return File(stream, MimeKit.MimeTypes.GetMimeType(filename), filename);

@AT1
Please set language for the text as the following:


            foreach (TextParagraph p in textbox.TextBody.TextParagraphs)
            {
                p.Font.Name = "MS Gothic";
                p.TextOptions.LanguageCode = CountryCode.Japan;
                p.IsEastAsianLineBreak = true;
            }

Great, that worked! Now I save the excel file in pdf as below, then ‘。’ comes at the beginning of the lien again.

Aspose Textbox 2 (2).pdf (23.0 KB)

        MemoryStream stream = new MemoryStream();
        workbook.Save(stream, SaveFormat.Pdf);
        stream.SeekToZero();

        string fname = "test.pdf";
        return File(stream, MimeKit.MimeTypes.GetMimeType(fname), fname);

@AT1,

It is nice to know that it works when rendering to XLSX. Regarding rendering to PDF, we found the issue as you mentioned and will be looking into it soon.

@AT1,

As we reproduced Asian line break issue for shapes when rendering Excel file to PDF you pointed above, so, we have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSNET-55511

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@amjad.sahi
Thank you so much for your support!

@AT1,

You are welcome.

@AT1
Hi,
Your issue(CELLSNET-55511) has been resolved and the fixed functionality will be released with version 24.5.
Here is the resulting file generated using the latest function:
CELLSNET-55511.pdf (23.0 KB)

@duojie.yang
Thank you for the fix. I really appreciate your support as always.

@AT1
You are welcome. If you have any questions, please feel free to contact us.