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

Free Support Forum - aspose.com

Table Shifting Errors

Hi dear,

We use this code( table.TextWrapping = TextWrapping.None; ) to solve another problem which you say below the article.
https://forum.aspose.com/t/55731

But our many documents(excell and word) are shifting strangly from this code.

We attached three shifting word documents and wait your solution.

Thanks.

Hi Ahmet,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.

  • Please

create a standalone/runnable simple application (for example a Console
Application Project
) that demonstrates the code (Aspose.Words code) you used to generate
your output document

  • Please attach the output Word file that shows the undesired behavior.
  • Please
    attach your target Word document showing the desired behavior. You can
    use Microsoft Word to create your target Word document. I will
    investigate as to how you are expecting your final document be generated
    like.

As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

Hi Tahir,

I attach our test project and test doc input and output. In project when we delete this code ‘table.TextWrapping = TextWrapping.None;’, project is working correctly. But we solved another error with this code which you said in another article.

Waiting your solution

Thanks

Attachments: http://file.bimser.com.tr/DOSYALAR/setup/aspose_attachments.zip

Hi Ahmet,

Thanks for sharing the detail. Please note that Aspose.Words mimics the same behavior as MS Word does. If you change the table’s text wrapping to ‘None’ using MS Word, you will get the same output.

Please check the left indent of table in the header of document. It is -0.35 inch. Please check the attached image. In your case, I suggest you please set the left indent of table as shown in following code snippet.

Hope this helps you. Please let us know if you have any more queries.

foreach (Aspose.Words.Tables.Table table in doc.GetChildNodes(Aspose.Words.NodeType.Table, true))
{
    table.TextWrapping = Aspose.Words.Tables.TextWrapping.None;
    table.LeftIndent = ConvertUtil.InchToPoint(-.35);
}

Hi Tahir,

Thanks for your kindly reply. But our problem didnt solve. Because, It is not about only one document. We have to find a more comprehensive solution. If we use this code,Many different problems can occur in documents.

foreach (Aspose.Words.Tables.Table table in doc.GetChildNodes(Aspose.Words.NodeType.Table, true))
{
    table.TextWrapping = Aspose.Words.Tables.TextWrapping.None;
}

But we cant use this code, One of the document which you solve with this code in below the article.

ControlChar.LineBreak in worddoc

We expect your urgent solution.

I attached an another doc which have same problem.

Thanks

Hi Ahmet,

Thanks
for your inquiry. This is not necessary to set the table’s TextWrapping as ‘None’ for each table for all of your documents. It depends according to your requirements. In your case, Aspose.Words behavior is correct.

I suggest you please set the table’s text wrapping as ‘None’ if the replacement tag comes before the Table node.

You may also set the ‘Move with text’ option in your template document manually to get the required output. In this case, you do not need to set the text wrapping as ‘None’. See the attached image for detail. However, this feature is not available in Aspose.Words at the moment. I have logged this feature request as WORDSNET-10713 in our issue tracking system. You will be notified via this forum thread once this feature is available.