Thanks for your patience. We have investigated the requirement(PDFNEWJAVA-35550) and would like to suggest you to create a gradient image by using java.awt and then add this image as a background via method cell.setBackgroundImageFile(…). Please, see the full code snippet below, it will help you to accomplish the task.
com.aspose.pdf.Document doc = new com.aspose.pdf.Document();<o:p></o:p>
doc.getPages().add();<o:p></o:p>
Table table1 = new Table();<o:p></o:p>
table1.setColumnWidths(“50 50
50”);<o:p></o:p>
table1.setRepeatingRowsCount(1);<o:p></o:p>
com.aspose.pdf.Row row1 =
table1.getRows().add();<o:p></o:p>
row1.setDefaultCellBorder(new BorderInfo(<o:p></o:p>
BorderSide.Left | BorderSide.Top | BorderSide.Bottom | BorderSide.Right, 1.25F,
com.aspose.pdf.Color.getBlack()));<o:p></o:p>
row1.getCells().add(“col1”);<o:p></o:p>
row1.getCells().add(“col2”);<o:p></o:p>
row1.getCells().add(“col3”);<o:p></o:p>
table1.setRepeatingRowsCount(1);<o:p></o:p>
BufferedImage bufferedImage = createGradientMask(100, 100, 1);<o:p></o:p>
ImageIO.write(bufferedImage, “jpg”, new File(“c:/pdftest/temp_bk.jpg”));<o:p></o:p>
<o:p></o:p>
// Create 100 rows with three
columns each<o:p></o:p>
for (int i = 0; i <= 100;
i++) {<o:p></o:p>
com.aspose.pdf.Row row2 = table1.getRows().add();<o:p></o:p>
row2.setDefaultCellBorder(new com.aspose.pdf.BorderInfo(BorderSide.All, 2F,
com.aspose.pdf.Color.getBlue()));<o:p></o:p>
row2.getCells().add(“ITEM1”);<o:p></o:p>
row2.getCells().add(“ITEM2”);<o:p></o:p>
<o:p></o:p>
Cell cell = row2.getCells().add(“ITEM3”); <o:p></o:p>
cell.setBackgroundImageFile(“c:/pdftest/temp_bk.jpg”);<o:p></o:p>
}<o:p></o:p>
doc.getPages().get_Item(1).getParagraphs().add(table1);<o:p></o:p>
doc.save(“c:/pdftest/TableBorderIssue.pdf”);<o:p></o:p>
new File(“c:/pdftest/temp_bk.jpg”).delete();<o:p></o:p>
…<o:p></o:p>
public static BufferedImage
createGradientMask(int width, int height, int orientation) {<o:p></o:p>
BufferedImage gradient = new BufferedImage(width,
height, BufferedImage.TYPE_INT_ARGB);<o:p></o:p>
Graphics2D g = gradient.createGraphics();<o:p></o:p>
GradientPaint paint = new GradientPaint(0.0f,
0.0f, new java.awt.Color(1.0f,
1.0f, 1.0f, 1.0f),<o:p></o:p>
orientation == 0 ? width : 0.0f,<o:p></o:p>
orientation == 1 ? height : 0.0f,<o:p></o:p>
new java.awt.Color(1.0f, 1.0f, 1.0f, 0.0f));<o:p></o:p>
g.setPaint(paint);<o:p></o:p>
g.fill(new
Rectangle2D.Double(0, 0, width, height));<o:p></o:p>
g.dispose();<o:p></o:p>
gradient.flush();<o:p></o:p>
return gradient;<o:p></o:p>
}