We're pleased to announce the release of Spire.PDF 11.12.0. This version introduces a new PdfFreeTextAnnotation.StringFormat property that supports both horizontal and vertical text alignment. It also includes rendering adjustments and multiple bug fixes related to PDF conversion, annotation processing, and multilingual text rendering. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Adjustment | — | Enhanced the underlying rendering logic for converting PDFs to images on the WPF platform, resulting in significantly improved output image quality. |
| New feature | SPIREPDF-7826 | Deprecated the PdfFreeTextAnnotation.TextAlignment property and added the new PdfFreeTextAnnotation.StringFormat property to support horizontal and vertical text alignment.
PdfDocument newPdf = new PdfDocument();
PdfPageBase page = newPdf.Pages.Add();
Spire.Pdf.Graphics.PdfFont font = new PdfFont(PdfFontFamily.Helvetica, 10f);
SizeF textSize = font.MeasureString("sample");
RectangleF rect = new RectangleF(50,50, textSize.Width, textSize.Height);
Spire.Pdf.Annotations.PdfFreeTextAnnotation textAnnotation = new Spire.Pdf.Annotations.PdfFreeTextAnnotation(rect);
textAnnotation.Text = "sample";
textAnnotation.Subject = "subject";
textAnnotation.Font = font;
Spire.Pdf.Annotations.PdfAnnotationBorder border = new Spire.Pdf.Annotations.PdfAnnotationBorder(8);
textAnnotation.Border = border;
textAnnotation.LineEndingStyle = Spire.Pdf.Annotations.PdfLineEndingStyle.None;
textAnnotation.Size = new SizeF(textSize.Width * 1.5F, textSize.Height * 1.5F);
textAnnotation.StringFormat.Alignment = PdfTextAlignment.Center;
textAnnotation.StringFormat.LineAlignment = PdfVerticalAlignment.Middle;
page.Annotations.Add(textAnnotation);
newPdf.SaveToFile(result);
|
| Bug | SPIREPDF-2261 | Fixed the issue where Arabic characters entered into form fields were displayed with incorrect text direction. |
| Bug | SPIREPDF-4834 | Fixed the issue where content became inconsistent when converting XPS to PDF. |
| Bug | SPIREPDF-6712, SPIREPDF-6873 | Fixed the issue where Arabic and Hebrew text rendered incorrectly when converting PDF to PDF/A-3a. |
| Bug | SPIREPDF-7526 | Fixed the issue where text blocks were unnecessarily split into multiple lines during PDF-to-PPTX conversion. |
| Bug | SPIREPDF-7816 | Fixed the issue where removing annotation borders had no effect. |
| Bug | SPIREPDF-7828 | Fixed the issue where a System.Exception was thrown during OFD-to-PDF conversion. |
Click the link to download Spire.PDF 11.12.0:
More information of Spire.PDF new release or hotfix: