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

Free Support Forum - aspose.com

Cellspacing doesn't work for PDF

Hi,

I am using Aspose.Words for Java, when I wanted to set CellSpacing for Table, MS Word looks fine, but PDF doesn’t support CellSpacing. Is it a defect of Aspose?

My testing codes:
import java.awt.Color;

import com.aspose.words.Cell;
import com.aspose.words.DocumentBuilder;
import com.aspose.words.LineStyle;
import com.aspose.words.Table;

public class TestAsposeCellSpacing {

public static void main( String []argv ) throws Exception{
DocumentBuilder docBuilder = new DocumentBuilder();

docBuilder.clearRunAttrs();

//begin table
Table table = docBuilder.startTable();
docBuilder.getCellFormat().clearFormatting();
docBuilder.getRowFormat().clearFormatting();

docBuilder.insertCell();
docBuilder.write( “A” );

docBuilder.getCellFormat().getBorders().setColor( Color.BLACK );
docBuilder.getCellFormat().getBorders().setLineWidth( 1 );
docBuilder.getCellFormat().getBorders().setLineStyle( LineStyle.SINGLE );

docBuilder.getRowFormat().setCellSpacing( 10.0 );

//End - 1st Row
docBuilder.endRow();

docBuilder.insertCell();
docBuilder.write( “B” );

docBuilder.getCellFormat().getBorders().setColor( Color.BLACK );
docBuilder.getCellFormat().getBorders().setLineWidth( 1 );
docBuilder.getCellFormat().getBorders().setLineStyle( LineStyle.SINGLE );

docBuilder.getRowFormat().setCellSpacing( 10.0 );

//End - 1st Row
docBuilder.endRow();

// End Table
docBuilder.endTable();

docBuilder.getDocument().save( “C:\testCellSpacing.doc” );

//docBuilder.getDocument().updateTableLayout();
docBuilder.getDocument().save( “C:\testCellSpacing.pdf” );
}
}

Thanks,
Feng

Hi XianFeng,


Thank you for inquiry. While using latest Aspose.Words 11.0.0. I managed to reproduce this problem on my side. I have logged your issue into our bug tracking system. Your request has also been linked to the appropriate issue. Once we sort it out, we will let you know. Sorry for inconvenience.


Hi Imran,

This issue is still seen in AsposeWordsForJava 13.3. Any plan to fix this sooner?

Thanks,
Kumar

Hi XianFeng,


Thanks for your patience. Your issue is related to cell spacing (The support of cell spacing in layout). This is a new feature. I am afraid this issue has now been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments.


We apologize for your inconvenience.


Hi Tahir,

Is there a defect/enhancement created for this? Pls link to this thread as well.

Thanks,
Kumar

Hi Kumar,


Thanks for your inquiry. This thread is already linked with the missing feature shared in first post. The feature ID is WORDSNET-5926. We will update you via this forum thread once this feature is available.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan