Spire.PDF 3.0.43 starts to support draw multiple string formats in a single grid cell

We are pleased to announce a new version-Spire.PDF pack hotfix 3.0.43. Our develop team not only focus on fixing bugs, but also add new feature to this version. Please check the detailed information as below.

New Feature:

  • Add new feature to draw multiple string formats in a single grid cell.
  • Add a property Page.ActualSize to get actual size of page.
  • Add new method IsBlank() to detect if the content of page is blank.

Sample code of how to draw multiple string formats in a single grid cell:

PdfDocument doc = new PdfDocument();
PdfPageBase page = doc.Pages.Add();
PdfGrid grid = new PdfGrid();
grid.Style.CellPadding = new PdfPaddings(1, 1, 1, 1);
PdfGridRow row = grid.Rows.Add();
grid.Columns.Add(1);
float width = page.Canvas.ClientSize.Width - (grid.Columns.Count + 1);
grid.Columns[0].Width = width * 0.25f;
PdfGridCellTextAndStyleList lst = new PdfGridCellTextAndStyleList();
PdfGridCellTextAndStyle textAndStyle = new PdfGridCellTextAndStyle();
textAndStyle.Text = "Name";
textAndStyle.Font = new PdfTrueTypeFont(new System.Drawing.Font("Airal", 10f, FontStyle.Bold), true);
textAndStyle.Brush = PdfBrushes.Green;
lst.List.Add(textAndStyle);
textAndStyle = new PdfGridCellTextAndStyle();
textAndStyle.Text = ":amy";
textAndStyle.Font = new PdfTrueTypeFont(new System.Drawing.Font("Arial", 10f, FontStyle.Italic), true);
textAndStyle.Brush = PdfBrushes.Red;
lst.List.Add(textAndStyle);
row.Cells[0].Value = lst;
PdfLayoutResult result = grid.Draw(page, new PointF(10, 20));
doc.SaveToFile(outputFile, FileFormat.PDF);

Bug solutions:

  • Fix the incorrect data issue in image converted from PDF
  • Fix the issue that column name is incorrect in image converted from PDF.
  • Improve the time performance for converting HTML to PDF.
  • Fix the issue that PdfPageSize.A4 is not actual A4 size.
  • Fix the error "Object reference not set to an instance of an object." caused in merging pdf files.
  • Fix the issue that the page is added to the end of the existing pdf when adding a blank page to the beginning of an existing PDF
  • Fix the issue that it adds additional horizontal scroll bar in HTML converted from PDF.

Experience and Test the new version of Spire.PDF at first here:

http://www.e-iceblue.com/Download/download-pdf-for-net-now.html