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

Free Support Forum - aspose.com

Borders only visible with a zoom


I was trying to add a bottom border to a cell which is not the last cell of my tab. And when the next row has no border I can’t see my border if I don’t zoom.
If I create a cell with a top border it’s ok, I think that maybe it’s
because the cell under my cell with bottom border has no border itself
that it doesn’t work.

I created this sample code for you to see the problem.

var doc = new Pdf();

var section = new Section();

//create table and lines
var t1 = new Table() { ColumnWidths = “260” };
var r1 = new Row(t1) { BackgroundColor = new Color(0, 0, 255) };
var c1 = new Cell(r1) ;
c1.Border = new BorderInfo(System.Convert.ToInt16(BorderSide.Bottom), 0.5f, new Color(255, 0, 0));
c1.Paragraphs.Add(new Text(“a red bottom border is applied on this cell -> you can’t see it if you don’t zoom”));

var r2 = new Row(t1) { BackgroundColor = new Color(0, 255, 0) }; ;
var c2 = new Cell(r2) ;
c2.Paragraphs.Add(new Text(“no borders applied on this cell”));

var r3 = new Row(t1) { BackgroundColor = new Color(0, 0, 255) }; ;
var c3 = new Cell(r3);
c3.Border = new BorderInfo(System.Convert.ToInt16(BorderSide.Top), 0.5f, new Color(255, 0, 0));
c3.Paragraphs.Add(new Text(“a red top border is applied on this cell -> you can see it”));


const string file = @“D:/AsposeSampleBorder.pdf”;

Thanks in advance for the help.

Hi Anouck,

I have managed to reproduce this issue and its been logged in our issue tracking system as PDFNEWNET-30747. We will further look into the details of this issue and will keep you updated on the status of correction. Please be patient and spare us little time. We apologize for this inconvenience.

Hi Anouck,

Thanks for your patience.

We have further investigated this issue and as per our observations, in order to resolve the above stated issue, please try using following code snippet.


Document doc = new

Page page = doc.Pages.Add();

//create table and lines

Aspose.Pdf.Table t1 = new Aspose.Pdf.Table();

t1.ColumnWidths = "260";

Aspose.Pdf.Row r1 = new Aspose.Pdf.Row();

r1.BackgroundColor = System.Drawing.Color.Blue;

Aspose.Pdf.Cell c1 = new Aspose.Pdf.Cell();

c1.Border = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.Bottom, 0.5f, System.Drawing.Color.Red);

c1.Paragraphs.Add(new TextFragment("a red bottom border is applied on this cell -> you can't see it if you don't zoom"));



Aspose.Pdf.Row r2 = new Aspose.Pdf.Row();

r2.BackgroundColor = System.Drawing.Color.Green;

Aspose.Pdf.Cell c2 = new Aspose.Pdf.Cell();


c2.Paragraphs.Add(new TextFragment("no borders applied on this cell"));


Aspose.Pdf.Row r3 = new Aspose.Pdf.Row();

r3.BackgroundColor = System.Drawing.Color.Blue;

Aspose.Pdf.Cell c3 = new Aspose.Pdf.Cell();


c3.Border = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.Top, 0.5f, System.Drawing.Color.Red);

c3.Paragraphs.Add(new TextFragment("a red top border is applied on this cell -> you can see it"));




The issues you have found earlier (filed as PDFNEWNET-30747) have been fixed in Aspose.Pdf for .NET 7.8.0update.

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