Spire.PDF 12.2.14 supports creating Hatch Brushes with the PdfHatchStyle interface

Spire.PDF 12.2.14 supports creating Hatch Brushes with the PdfHatchStyle interface

2026-02-28 08:52:28

We're pleased to announce the release of Spire.PDF 12.2.14. This version supports creating Hatch Brushes using the PdfHatchStyle interface and configuring text color when replacing text in PDF pages. Meanwhile, the compression functionality for netstandard DLLs has been optimized, and some issues that occurred when converting PDF to images, adding images, or drawing fonts have also been successfully fixed. More details are listed below.

Here is a list of changes made in this release

Category ID Description
Optimization SPIREPDF-7881 Optimizes the compression functionality for netstandard DLLs to improve the file compression ratio.
New Feature SPIREPDF-7780 Added support for the PdfHatchStyle interface to create Hatch Brushes.
PdfDocument pdf = new PdfDocument();
foreach (PdfHatchStyle type in Enum.GetValues(typeof(PdfHatchStyle)))
{
    PdfPageBase page = pdf.Pages.Add();
    PdfCanvas canves = page.Canvas;
    Color foreColor = Color.FromArgb(255, 255, 255, 0);
    Color backColor = Color.FromArgb(255, 78, 167, 46);
    page.Canvas.DrawString(type.ToString(), new PdfTrueTypeFont(new System.Drawing.Font("Arial", 16)), new PdfSolidBrush(Color.Black), new PointF(0, 0), true);
    PdfHatchBrush brush = new PdfHatchBrush(type, foreColor, backColor);
    canves.DrawRectangle(brush, 100, 100, 300, 200);
}
pdf.SaveToFile(output);
pdf.Dispose();
New Feature SPIREPDF-7907 Added support for configuring text color when replacing text in PDF pages.
PdfTextReplacer textReplacer = new PdfTextReplacer(page);
textReplacer.Options = textReplaceOptions;
textReplacer.ReplaceAllText("文档", "文件", Color.Red);
Bug Fix SPIREPDF-7853 Fixes an issue where converting PDF to images resulted in incorrect rendering.
Bug Fix SPIREPDF-7920 Fixes an issue where shadows were offset when converting PDF to images.
Bug Fix SPIREPDF-7952 Fixes an issue where adding images to a PDF resulted in slow execution and excessively large file sizes.
Bug Fix SPIREPDF-7953 Fixes a NullReferenceException thrown when drawing the "MS Gothic" font onto a page.
Click the link to download Spire.PDF 12.2.14:
More information of Spire.PDF new release or hotfix: