Question: How do you Text wrap around a newly created table?

To whom it may concern,
I have recently created a simple table cell in a word document using aspose. I searched through the help files and found no specific help on how to wrap text around a table.
Is there a way to ensure that text can wrap around a table within the word document?
Thank you in advance for any information that you may provide.
EricF

@theGleep

Thank you for your question.

To control text wrapping you are welcome to use CellFormat.WrapText property in Aspose.Words.Tables namespace:

https://reference.aspose.com/words/java/com.aspose.words/cellformat#wraptext

Please let us know if we can help further.

Hi again,
Unfortunately this is not what I was looking for . I have attached a screen shot from MS Word concerning table properties. The screen shot shows the property, it is named “Text wrapping” I was looking for in aspose.
Does this feature exist in Aspose.words?
Thanks,
eric

Hi
Thanks for additional information. Unfortunately, Aspose.Words doesn’t allow setting text wrapping of the table. This is known issue (#907).
Best regards.

The issues you have found earlier (filed as WORDSNET-581) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(33)

How is this issue fixed? I cannot find a “text wrap” property…nor can I find “Around” when I search.
What property of what object should I be looking for to allow content to flow beside my table?

Hello
Thanks for your inquiry. Yes, you are right; this feature is not implemented yet.
Table public API was improved but not this property. Your request has been linked to the appropriate feature. You will be notified as soon as it is supported.
Best regards,

Hi,

I’m just wondering if this feature is available now in aspose.words 10.5.0?

Hi
Thanks for your request. No unfortunately, currently there is no way to specify Wrap Type of a newly created table. This feature will be added in one of future releases. We will let you know once it is available.
Best regards,

Hello,

This issue is also a problem for my project.

Do you know when the fix will be available ? In which version ?

Regards,

Hi
Thanks for your inquiry. Unfortunately the issue is still unresolved, and it is difficult to provide you any reliable estimate regarding this feature at the moment.
May I know why you need to set Wrap Type to table? Maybe we will find other way to achieve what you need.
Best regards,

Hi,

I am having issues with this same problem.

Using Aspose.Word for java 10.6.0

The problem I am having is that tables imported from word docs that have text wrap on and then are exported to a PDF are being placed at the bottom of a page where they do not entirely fit, so they go off the page and this is causing problems with the page numbers on the next page.

Are there any known work around for this? like setting the wrap style programmatically on each table to be none instead of around. I saw in a rather old post there was a mention of placing tables inside text boxes.
Foating table / text wrapping Is that a potential solution?

Any help would be appreciated.

Thanks

Hi
Thanks for your request. Could you please attach your input document here for testing? We will check the issue and provide you more information.
Best regards,

Here is a copy of test file that illustrates the table going off the page. In this small case I am not seeing the pagination problems that happen in the larger file. I may upload another file if I can cause that in a smaller file as well, maybe they are unrelated issues. But any suggestions on the table problem would be great. I would have to apply some change programmatically because I do not have control over the original word source file.

Thanks

Hi
Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Unfortunately, I cannot suggest you any programmatic workaround of this issue at the moment. In your case it will not be enough to simply make the table inline. After making it inline empty paragraphs that are wrapped around the table will appear after the table and content of the document will be moved down.
Best regards,

The issues you have found earlier (filed as WORDSNET-5328) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(6)

The issues you have found earlier (filed as WORDSNET-5501) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

@zme-interview-procto

By default, MS Word does not allow you to type any text either to the left or right of the table. However, it can be achieved by text wrapping feature of table using Table Properties > Text wrapping > Around steps.

We introduced this feature in Aspose.Words 13.6. You can wrap the text around the table using Table.TextWrapping property by setting its value to TextWrapping.Around.

Following code example shows how to work with table text wrapping.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a table and a paragraph of text after it
Table table = builder.startTable();
builder.insertCell();
builder.write("Cell 1");
builder.insertCell();
builder.write("Cell 2");
builder.endTable();
table.setPreferredWidth(PreferredWidth.fromPoints(300));

builder.writeln("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");

// Set the table to wrap text around it and push it down into the paragraph below be setting the position
table.setTextWrapping(TextWrapping.AROUND);
table.setAbsoluteHorizontalDistance(100);
table.setAbsoluteVerticalDistance(20);

doc.save(MyDir + "Table.WrapText.docx");