Hi,
Hi Saurabh,
Hi,
Hi Saurabh,
com.aspose.pdf.Table table = new
com.aspose.pdf.Table();<o:p></o:p>
table.setColumnWidths("20% 20% 20% 20% 20%");
Please feel free to contact us for any further assistance.
Best Regards,
Hi,
Hi Saurabh,
Hi,
Hi Saurabh,
Hi,
Hi Saurabh,
Hi,
SaurabhMayekar:Sorry for late reply, but can you please share your code ?
Document doc = new Document();
Page page = doc.getPages().add();
// Initializes a new instance of the Table
com.aspose.pdf.Table table = new com.aspose.pdf.Table();
table.setColumnWidths( "200 200 200 200 200");
for( int i = 0; i < 20; i++ ) {
Row row = table.getRows().add();
for( int j = 0; j < 5; j++ ){
Cell cell = getCell( i, j );
row.getCells().add(cell);
}
}
// Add table object to first page of input document
page.getParagraphs().add(table);
doc.save(myDir+"DOMTable.pdf");
-----
private static Cell getCell( int i, int j ) {
TextSegment segment = new TextSegment( "This is some sample text");
TextState state = segment.getTextState();
state.setFont( FontRepository.findFont("Verdana") );
state.setForegroundColor(com.aspose.pdf.Color.getBlack() );
state.setBackgroundColor( com.aspose.pdf.Color.getWheat() );
//state.setFontSize( 15f );
TextFragment textFragment = new TextFragment();
textFragment.getSegments().add( segment );
Cell cell = new Cell();
cell.getParagraphs().add( textFragment );
BorderInfo info = new BorderInfo();
com.aspose.pdf.GraphInfo ginfo = new com.aspose.pdf.GraphInfo();
ginfo.setLineWidth( 2 );
ginfo.setColor( com.aspose.pdf.Color.getBlack() );
info.setTop( ginfo );
info.setLeft( ginfo );
info.setRight( ginfo );
info.setBottom( ginfo );
cell.setBorder( info );
MarginInfo mInfo = new MarginInfo( 5, 5, 5, 5 );
//cell.setMargin( mInfo );
return cell;
}
Best Regards,
SaurabhMayekar:Cause in the attached PDF I found the exact same the thing that I don't want it to occur.I have attached image which indicates what I want to ignore .