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

Free Support Forum - aspose.com

How to set and get positioning of floating table using Java

I want the table always positioned at the botoom of last page.but I can’t find how to set table’s postion.
I can use the code to set table’s textwrapping that is
Table tablefirst = (Table) doc.getChild(NodeType.TABLE, tableindex-1, true);|
Then the question is How can I set tablefirst’s position? I see this code from example that is
if (tablefirst.getTextWrapping() == TextWrapping.AROUND) {
but how can I set tablefirst.setRelativeVerticalAlignment?

I hope your response! Thanks very much!


Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we have already logged this feature request as WORDSNET-12204 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

Thanks for your reply and I will trace it.
Are there any ways that can solve this problem?
I tried builder.writeln() befor the table if doc.getPageCount() add one.But I used doc.getPageCount() to get doc’s current total page. It couldn’t change?
Hope your tip!Thanks Again!


Could you please ZIP and attach your input and expected output documents? We will then provide you more information about your query.

The issues you have found earlier (filed as WORDSNET-12204) have been fixed in this Aspose.Words for .NET 20.1 update and this Aspose.Words for Java 20.1 update.

Got it,Thanks!
But It isn’t effective still。

com.aspose.words.NodeCollection allTables = doc.getChildNodes(NodeType.TABLE, true);

  int tableindex = allTables.getCount();
  System.out.println("table count = "+tableindex);
  Table tablefirst = (Table) doc.getChild(NodeType.TABLE, tableindex-1, true);
  for (Cell cell : (Iterable<Cell>) tablefirst.getChildNodes(NodeType.CELL, true)) {
		// Call this method if table's cell is created on the fly
		// newly created cell does not have paragraph inside
		for (Paragraph para : cell.getParagraphs())
			if (!(cell.getParentRow().isLastRow() && para.isEndOfCell()))
  if (tablefirst.getTextWrapping() == TextWrapping.AROUND) {

I imported aspose-words-20.1-jdk17.jar.


Could you please share some more detail about your requirement along with input document and expected output? We will then provide you more information about your query .