Issue with line breaks appearing in Chinese text

Hi,

I have an issue where the following string although in one line, when appearing in the outputted pdf it is putting in a line break between the words Strengthscope™ and the Chinese text.

Strengthscope™ 的设计宗旨是帮助个人和团队识别确定他们的独特优势。我们把“优势”定义为能够赋予动力、促成出色业绩并提高自我幸福感的那些核心素质或特征。请注意,单纯具备一项优势不会自动导致相应领域的业绩表现提高。可能您和/或您所在团队的某项被识别的优势未得到发挥或“未经测试”。

Can someone please explain why this is happening as our client wants this to appear in one line?

Here is the xml:


Strengthscope™
的设计宗旨是帮助个人和团队识别确定他们的独特优势。我们把“优势”定义为能够赋予动力、促成出色业绩并提高自我幸福感的那些核心素质或特征。请注意,单
纯具备一项优势不会自动导致相应领域的业绩表现提高。可能您和/或您所在团队的某项被识别的优势未得到发挥或“未经测试”。



Regards,

Martin

Hi Martin,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code.

I am able to replicate your issue and I have registered the issue in our issue tracking system as PDFNEWNET-34272. The line break appears due to a space between “Strengthscope™” and Chinese text (if the space is removed, line break does not happen). We will further look into this issue and get back to you soon.

Sorry for the inconvenience,

Hi,

I also have the same problem with the following text:

第2-3章:团队优势分布综述(涵盖了情感、关系、思维和执行四大类),以及这些优势的最佳发挥指南。团队在通过“认识”阶段时请运用这些章节的内容。

The line is breaking after the hyphen by the no.2. It is appearing like this in the pdf output:

第2-
3章:团队优势分布综述(涵盖了情感、关系、思维和执行四大类),以及这些优势的最佳发挥指南。团队在通过“认识”阶段时请运用这些章节的内容。

Here is the xml around the text:


第2-3章:团队优势分布综述(涵盖了情感、关系、思维和执行四大类),以及这些优势的最佳发挥指南。团队在通过“认识”阶段时请运用这些章节的内容。


Hi,

I also have a similar issue with this text:

下面的图表以1 - 10 的进阶度显示您的各项优势与对照组的比较结果。图表里的条柱显示相应的优势领域对您工作动力的提高程度,请勿与工作技能和胜任程度混淆。

The line is breaking after the number 10 in the text on the output pdf.

Xml used is:


下面的图表以1 - 10 的进阶度显示您的各项优势与对照组的比较结果。图表里的条柱显示相应的优势领域对您工作动力的提高程度,请勿与工作技能和胜任程度混淆。


Output is appearing in pdf like this:

下面的图表以1 - 10
的进阶度显示您的各项优势与对照组的比较结果。图表里的条柱显示相应的优势领域对您工作动力的提高程度,请勿与工作技能和胜任程度混淆。

Hi Martin,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the details.

I have tested the issue and noticed the same behavior of text line break in the generated PDF as mentioned by you. I have shared the information with the development team under issue id: PDFNEWNET-34272. We will notify you once we have any update regarding your issue.

Sorry for the inconvenience,

Here is yet another line break issue where the text is line breaking after the first segment where it should not:


优势运用过度:
你可能会故意承担“无法成功的任务”来挑战自己,从克服每一个障碍和困难获得成功中获得享受,而不管任务本身有多大价值

Hi Martin,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 7.3.0 where I have used the following code snippet and XML file to test the scenario and I am unable to notice any line break issue. For your reference, I have also attached the resultant PDF which I have generated. Can you please try using the latest release version and in case the problem still persists, please share the code snippet which you are using. We are sorry for your inconvenience.

[C#]

//Instantiate
Pdf instance by calling its empty constructor<o:p></o:p>

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();

// bind the source XML file

pdf1.BindXML("d:/pdftest/tmp1A5.xml",null);

//create the result PDF Document

pdf1.Save(@"D:\pdftest\ChineseText_Conversion_Issue.pdf");


[XML]

<?xml version="1.0" encoding="utf-8" ?>

<Pdf xmlns="Aspose.Pdf">

<Section>

<Text IsSpaced="true" IsKeptTogether="true" IsKeptWithNext="true" LineSpacing="1.35">

<Segment FontName="Arial Unicode MS" Color="rgb 90 114 196" IsTrueTypeFontBold="true" FontSize="9" IsUnicode="true">优势运用过度:</Segment>

<Segment FontName="Arial Unicode MS" FontSize="9" IsUnicode="true">你可能会故意承担“无法成功的任务”来挑战自己,从克服每一个障碍和困难获得成功中获得享受,而不管任务本身有多大价值</Segment>

</Section>

Hi,

I have tried as you suggested with version 7.3 and it still does not work, I have the same issue.

The xml used is this:


Strengthscope&#8482; 的设计宗旨是帮助个人和团队识别确定他们的独特优势。我们把“优势”定义为能够赋予动力、促成出色业绩并提高自我幸福感的那些核心素质或特征。请注意,单纯具备一项优势不会自动导致相应领域的业绩表现提高。可能您和/或您所在团队的某项被识别的优势未得到发挥或“未经测试”。


The pdf text this outputs to is in page 2 of the attached file and is the second paragraph of text and you will see there is a line break after the word StrengthScope.

fingo:
The xml used is this:


Strengthscope&#8482; 的设计宗旨是帮助个人和团队识别确定他们的独特优势。我们把“优势”定义为能够赋予动力、促成出色业绩并提高自我幸福感的那些核心素质或特征。请注意,单纯具备一项优势不会自动导致相应领域的业绩表现提高。可能您和/或您所在团队的某项被识别的优势未得到发挥或“未经测试”。


The pdf text this outputs to is in page 2 of the attached file and is the second paragraph of text and you will see there is a line break after the word StrengthScope.
Hi Martin,

Thanks for sharing the resources.

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNEWNET-34331. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.

Here is another line break issue. See the comments in the attached file on page 18 at the bottom table. Highlighted text should follow the line above it, not starting a new paragraph as it now appears to.

Here is the xml:


组织“支持与挑战”小组来评判团队宗旨和目标。可以提出下列或类似的问题:“用 1-10 尺度衡量,您对我们的指标和目标敬业程度多大?” “我们的指标和目标在多大程度上切合实际?”“我们的目标是否符合SMART原则 - 具体、可衡量、可实现、切实并有时间规定?”

Hi Mark,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details.

I am able to generate the line break issue and I have shared the information under PDFNEWNET-34331. We will inform you via this forum thread regarding any updates against the reported issue.

Sorry for the inconvenience,

Is there any more news on a fix for this yet?

Hi Mark,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for being patient.

I have asked the development team to share any updates / ETA regarding the resolution of your reported issue and as soon as I get a feedback, I will update you via this forum thread.

Sorry for the inconvenience,