We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PdfTextAlignment and PdfVerticalAlignment don‘t work

My test code:

PdfDocument pdfDoc = new PdfDocument();
PdfPage page2 = pdfDoc.Pages.Add();

// Create a new grid model.
PdfGrid grid2 = new PdfGrid();

// Add three Columns to the PdfGrid.
grid2.Columns.Add(3);

// Set Width for first column.
grid2.Columns[2].Width = 150f;
// Set the content format for the first column.
grid2.Columns[2].Format = new PdfStringFormat(PdfTextAlignment.Center, PdfVerticalAlignment.Middle);

// Add Header to the grid.
PdfGridRow[] headerRow = grid2.Headers.Add(1);
headerRow[0].Cells[0].Value = "Employee ID";
headerRow[0].Cells[1].Value = "Employee Name";
headerRow[0].Cells[2].Value = "Salary";

// Add Rows to the grid.
PdfGridRow row = grid2.Rows.Add();
row.Cells[0].Value = "E01";
row.Cells[1].Value = "Clay";
row.Cells[2].Value = "$10,000";

// Draw the grid in a PDF document.
grid2.Draw(page2, System.Drawing.PointF.Empty);

but PdfTextAlignment and PdfVerticalAlignment don‘t work

1 Reply

AG Angappan G Syncfusion Team April 1, 2010 10:05 AM UTC

Hi WASPCN,

Thank you for your interest in Syncfusion products.

We were able to reproduce the mentioned issue and we suspect that this could be a defect.

Could you please report these issues through Direct Trac Developer Support Systemhttps://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let us know if you have any other questions.

Regards,
Angappan.

Loader.
Live Chat Icon For mobile
Up arrow icon