Spire.PDF 7.12.1 supports .NET 6.0

2021-12-08 02:57:01

We are pleased to announce the release of Spire.PDF 7.12.1. This version supports NET 6.0, as well as supports getting the PDF page where the attachment is located, also supports to adds the methods of decrypting PDFs. In addition, it enhances the conversion from PDF to OFD, XPS to PDF, PDF to images. Besides, it fixes some known issues such as the result PDF size became larger after deleting image. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-4762 Supports .NET 6.0
New feature SPIREPDF-4577 Adds the methods of decrypting PDFs.
pdf.Security.DecryptOwnerPassWord(string ownerPassword);
pdf.Security.DecryptUserPassWord();
New feature SPIREPDF-4594 Supports getting the PDF page where the attachment is located.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(input);
int pageIndex = GetAttachmentPage(doc.Pages, attachmentName);

private int GetAttachmentPage(Spire.Pdf.Widget.PdfPageCollection pageCollection, string fileName)
{
    if (string.IsNullOrEmpty(fileName))
    {
        throw new ArgumentException("fileName is null or empty");
    }
    for (int i = 0; i < pageCollection.Count; i++)
    {
        PdfPageBase page = pageCollection[i];
        for (int j = 0; j < page.AnnotationsWidget.Count; j++)
        {
            Spire.Pdf.Annotations.PdfFileLinkAnnotationWidget pdfFileLinkAnnotationWidget = page.AnnotationsWidget[j] as Spire.Pdf.Annotations.PdfFileLinkAnnotationWidget;
            if (pdfFileLinkAnnotationWidget != null)
            {
                if (fileName.Equals(pdfFileLinkAnnotationWidget.FileName))
                {
                    return i;
                }
            }
        }
    }
    return -1;
}
Bug SPIREPDF-1683
SPIREPDF-4757
Fixes the issue that loading the PDF with the encrypted password failed
Bug SPIREPDF-2412 Fixes the issue that the content of the converted image was incorrect
Bug SPIREPDF-4449 Fixes the issue that the content of the converted XPS was incorrect
Bug SPIREPDF-4578 Fixes the issue that TIFF had a white background in the result PDF when drawing TIFF on PDF page on .NETCore platform
Bug SPIREPDF-4667 Fixes the issue that the content was inconsistent when converting XPS to PDF
Bug SPIREPDF-4759 Fixes the issue that the result PDF size became larger after deleting image
Bug SPIREPDF-4766 Fixes the issue that a blank section appeared on the right side of the converted OFD
Bug SPIREPDF-4768 Fixes the issue that the word containing the hyphen character was incorrect when converting PDF to SVG
Bug SPIREPDF-4779 Fixes the issue that the application threw System.NullReferenceException when converting PDF to images
Bug SPIREPDF-4783 Fixes the issue that the application threw System.NullReferenceException when printing PDF
Bug SPIREPDF-4785 Fixes the issue that setting text highlighting failed
Click the link to download Spire.PDF 7.12.1:
More information of Spire.PDF new release or hotfix: