Spire.PDF 9.11.4 adds the new PdfImageHelper interface to process images

2023-11-10 07:24:15

We are excited to announce the release of Spire.PDF 9.11.4. This version adds the new PdfImageHelper interface for image extraction, deletion, replacement and compression. It also enhances the conversion from PDF to XPS and XPS to PDF. Moreover, some known issues are fixed in this version, such as the issue that two columns of the extracted PDF table were merged. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature - Adds the new PdfImageHelper interface for image extraction, deletion, replacement and compression.
Key code snippets are as follows:
// Delete image:
imageHelper.DeleteImage(imageInfos[0]);

// Extract images:
int index = 0;
foreach (PdfImageInfo info in imageInfos)
{
    info.Image.Save(outputFile_I + string.Format("Image-{0}.png", index));
    index++;
}

// Replace image:
PdfImage image = PdfImage.FromFile(TestUtil.DataPath + "ImgFiles/E-iceblue logo.png");
imageHelper.ReplaceImage(imageInfos[0], image);

// Compress images:
foreach (PdfPageBase page in doc.Pages)
{
    foreach (PdfImageInfo info in imageHelper.GetImagesInfo(page))
    {
        bool success = info.TryCompressImage();
    }
}
Bug SPIREPDF-5781 Fixes the issue that two columns of the extracted PDF table were merged into one.
Bug SPIREPDF-6225 Fixes the issue that the result document of XPS to PDF conversion was blank.
Bug SPIREPDF-6232 Fixes the issue that it popped up page error when opening PDF converted from XPS with Adobe tools.
Bug SPIREPDF-6355 Fixes the issue that extra characters appeared in the content after converting PDF to XPS.
Bug SPIREPDF-6361 Fixes the issue that the program threw an exception System.NullReferenceException when loading PDF documents.
Click the link to download Spire.PDF 9.11.4:
More information of Spire.PDF new release or hotfix: