News Category

Spire.PDF 8.12.5 supports setting form field's Show/Hide and adding custom metadata

2022-12-14 09:51:25

We are excited to announce the release of Spire.PDF 8.12.5. This version supports setting the form field's Show/Hide, adding custom metadata, and adding a namespace to PDF metadata. Besides, it enhances the conversion from PDF to DOCX and images. What’s more, many issues are fixed in this version, such as the issue that finding text failed after drawing a watermark. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-2352 Supprts setting form field's Show/Hide.
Spire.Pdf.Fields.PdfField field = formWidget.FieldsWidget.List[0] as Spire.Pdf.Fields.PdfField;
//field.AnnotationFlags = Spire.Pdf.Annotations.PdfAnnotationFlags.Default; // Setting visibility
field.AnnotationFlags = Spire.Pdf.Annotations.PdfAnnotationFlags.Hidden; // Setting hidden
New feature SPIREPDF-5495 Supprts adding custom metadata.
using(PdfDocument doc = new PdfDocument("1.pdf"))
{
  using(Stream stream = new FileStream('1.xml',FileMode.Open))
 {
    doc.Metadata = PdfXmlMetadata.Parse(stream);
 }
  doc.SaveToFile('result.pdf');
}
New feature SPIREPDF-5506 Supports adding namespace to PDF metadata.
PdfXmlMetadata.RegisterNamespace("http://myRandomNamespace", "zf");
using(PdfDocument doc = new PdfDocument("1.pdf"))
{
    doc.Metadata.SetPropertyString("http://myRandomNamespace", "test1","my test");
    doc.SaveToFile('result.pdf');
}
PdfXmlMetadata.ResetNamespaces();
Bug SPIREPDF-5479 Fixes the issue that setting the property options.IsShowHiddenText = false to not extract hidden text did not work.
Bug SPIREPDF-5523 Fixes the issue that the table's background color was incorrect after converting PDF to docx.
Bug SPIREPDF-5597 Fixes the issue that the replacement of special characters failed.
Bug SPIREPDF-5615 Fixes the issue that the selected button was not shown in the PDF-Xchanger editor.
Bug SPIREPDF-5623 Fixes the issue that finding text failed after drawing watermark.
Bug SPIREPDF-5644 Fixes the issue that the program threw an exception "Object reference not set to an instance of an object" when converting PDF to image.
Click the link to download Spire.PDF 8.12.5:
More information of Spire.PDF new release or hotfix: