We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Correct replacing ENTER break with ENTER+SHIFT break

Using C#

How I can do this correctly?
This is how I’m trying

  1. public virtual string RemoveNewLines (string s)
  2. {
  3. if (!string.IsNullOrEmpty (s))
  4. {
  5. s.Replace (\n, Convert.ToChar (11));
  6. return s;
  7. }
  8. else
  9. {
  10. return “”;
  11. }
  12. }
With Enter is paragraph break which creates new paragraph.
Example:
1.1. Header
Clara
Ookrala Oo Karla
Korally

Actual result:
1.1. Header
1.2.Clara
1.3. Ookrala Oo Karla
1.4. Korally

Expected result:
1.1. Header
Clara
Ookrala Oo Karla
Korally

Hi Korally,


Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document
  • Aspose.Words generated output DOCX file showing the undesired behavior
  • Please attach your expected Word document here for our reference. We will investigate the structure of your expected documents as to how you want your final output be generated like. You can create expected document by using Microsoft Word.
  • Please create a standalone simplified console application (source code without compilation errors) that helps us reproduce your specific problems on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start further investigation into your issues and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click ‘Reply’ button that will bring you to the ‘reply page’ and there at the bottom you can include any attachments with that post by clicking the ‘Add/Update’ button.

Best regards,