Spire.PDF 10.3.16 supports getting the font and font size of the found text

Spire.PDF 10.3.16 supports getting the font and font size of the found text

2024-04-02 06:55:34

We're pleased to announce the release of Spire.PDF 10.3.16. This version supports getting the font and font size of the found text, optimizes the effect of compressing PDFs, and also fixes some issues occurred when converting XPS to PDF. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-5779 Supports getting the font and font size of the found text.
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile("test.pdf");
PdfTextFindOptions findOptions = new PdfTextFindOptions();
findOptions.Parameter = TextFindParameter.IgnoreCase;
foreach (PdfPageBase page in pdf.Pages)
{
  PdfTextFinder finder = new PdfTextFinder(page);
  finder.Options = findOptions;
  List results = finder.Find("total");
  foreach (PdfTextFragment text in results)
  {
	  String font=text.TextStates[0].FontName;
	  float size = text.TextStates[0].FontSize;
	  String fontF = text.TextStates[0].FontFamily;
  }
}
Bug SPIREPDF-2912 Optimizes the time consumption for building PDFs with a large number of pages.
Bug SPIREPDF-6370 Optimizes the effect of the PdfDestination method.
Bug SPIREPDF-6537 Fixes the issue that the content was lost after setting the PDF form field to Flatten.
Bug SPIREPDF-6541 Optimizes the time consumption for compressing PDFs.
Bug SPIREPDF-6553 Fixes the issue that the search highlighting didn't take effect.
Bug SPIREPDF-6559
SPIREPDF-6579
Fixes the issue that the application threw an "OutOfMemoryException" when converting to grayscale PDF.
Bug SPIREPDF-6580 Fixes the issue that some characters were displayed incorrectly when converting XPS to PDF.
Bug SPIREPDF-6582 Fixes the issue that the application threw the "FormatException" when converting OFD to PDF.
Bug SPIREPDF-6583 Fixes the issue that the images were missing when converting XPS to PDF.
Bug SPIREPDF-6600 Optimizes the effect of compressing PDFs.
Bug SPIREPDF-6607 Fixes the issue that the application threw an "ArgumentOutOfRangeException" when converting PDF to images.
Click the link to download Spire.PDF 10.3.16:
More information of Spire.PDF new release or hotfix: