Browse our Products

Aspose.PDF for .NET 26.4

Improvements and Changes

Features and Enhancements

Improved PDF to Image Conversion Performance

Aspose.PDF for .NET 26.4 introduces significant performance improvements for PDF-to-image conversion. This enhancement addresses issue PDFNET-41182, where converting PDF pages to JPEG images was reported to be slow, with each page taking several seconds to process.

With this update, the same scenario shows a much faster conversion time, making high-volume image export workflows more efficient when rasterizing PDF pages to JPEG format.

Here is an example of how to use this enhancement:

// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ConvertPdfToJpeg()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();

    // Open PDF document
    using (var pdfDocument = new Aspose.Pdf.Document(dataDir + "input.pdf"))
    {
        for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
        {
            using (var imageStream = new System.IO.FileStream(
                dataDir + string.Format("page{0}.jpg", pageCount),
                System.IO.FileMode.Create))
            {
                // Create Resolution object
                var resolution = new Aspose.Pdf.Devices.Resolution(300);

                // Create JPEG device with specified resolution
                var jpegDevice = new Aspose.Pdf.Devices.JpegDevice(resolution);

                // Convert a particular page and save the image to stream
                jpegDevice.Process(pdfDocument.Pages[pageCount], imageStream);
            }
        }
    }
}

PDF/UA Structure Tree Processing Performance Improvement

Aspose.PDF for .NET 26.4 improves the performance of PdfUaConvertStrategy.Process_7_1_structureTree when working with large PDF documents. This enhancement addresses issue PDFNET-61884, where CPU profiling identified the pageMCIDs.Contains(key) call as the primary performance bottleneck during structure tree processing.

By replacing the List<string> lookup with a HashSet<ulong> and introducing a composite key instead of relying on string formatting, this update delivers a significant performance boost when converting large PDF documents to PDF/UA format.

Here is an example of how to use this enhancement:

// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ConvertToPdfUa()
{
    // The path to the documents directory
    var dataDir = RunExamples.GetDataDir_AsposePdf_DocumentConversion();

    // Open PDF document
    using (var document = new Aspose.Pdf.Document(dataDir + "input.pdf"))
    {
        // Convert to PDF/UA format
        document.Convert(dataDir + "log.xml", Aspose.Pdf.PdfFormat.PDF_UA_1, Aspose.Pdf.ConvertErrorAction.Delete);

        // Save converted document
        document.Save(dataDir + "output.pdf");
    }
}

Bug Fixing and Other Changes

KeySummaryCategory
PDFNET-40078Incorrect Evaluation watermark text is added in PDF documentBug
PDFNET-40844Large HTML to PDF conversion performance isuseBug
PDFNET-41019Page orientation changes when adding Table in HeaderBug
PDFNET-41212Oswald font is not reflecting as excepted in new generatorBug
PDFNET-61886UB (Undefined Behaviour) in TransparentContentRemoval.AddStoredImageBug
PDFNET-39275HTML to PDF - Significant loss of Fidelity in resultant fileBug
PDFNET-39279PDF to XPS: resultant XPS is missing images.Bug
PDFNET-39281PDF to DOCX - Bottom and Right table borders do not appearBug
PDFNET-39288Unable to validate PDF/A_1b compliance of documentBug
PDFNET-39306PDF to PDF/A - Resultant file is not PDF/A_2a compliantBug
PDFNET-39309Multithreading issue PNGDeviceBug
PDFNET-39314XPS to PDFA: background color of some elements changedBug
PDFNET-39315XPS to PDFA: Image is converting partially and background color is changedBug
PDFNET-39320PageNumberStamp is not being displayedBug
PDFNET-39752save() throws out of memory when data overlaps on the footer areaBug
PDFNET-39753PDF to PNG - Conversion process is taking much timeBug
PDFNET-39758PDF to PDF/A - Signature appears black after conversionBug
PDFNET-39942PDF to PNG results into an incorrect imageBug
PDFNET-39960Footnote layout issues when line spacing is appliedBug
PDFNET-40001Deleting first child bookmark in nested bookmarkBug
PDFNET-40094Open and Resave the PDF corrupts outputBug
PDFNET-40116Pdf form fields become flatten after saving the fileBug
PDFNET-40119Corrupted watermark when using API in trial modeBug
PDFNET-40131PDF to PDF/A - Text justification is changedBug
PDFNET-40147TIFF to PDF: conversion performance issue with large image filesBug
PDFNET-40167PDF to HTML: throws OutOfMemoryExceptionBug
PDFNET-40176PDF conversion to any format drops imagesBug
PDFNET-40193PDF stamp produces display issue of embedded fontsBug
PDFNET-40197PDF to PDFA2b: resultant PDFA2b document loses the annotationsBug
PDFNET-40205PDF to PNG - Resultant image shows dark bandingBug
PDFNET-40803PDF to HTML: resultant HTML has invalid charactersBug
PDFNET-40861Issue in adding header/footer to PDF generated from excelBug
PDFNET-40865Issue in adding header/footer to PDF generated from PPTXBug
PDFNET-40877Form fields contents disappear after Form resizeBug
PDFNET-40879MHT to PDF: images are missing in resultant PDFBug
PDFNET-40971PDF to PDFA: cuts page contentsBug
PDFNET-40978PDF to PDFA: Object z-order issueBug
PDFNET-40979PDF to PDFA: Object z-order issueBug
PDFNET-40980PDF to PDFA: Object z-order issueBug
PDFNET-41021Assigning name to image corrupts the PDF fileBug
PDFNET-41036Stamping PDF document deforms the contentsBug
PDFNET-41142PDF to DOCX - Incorrect font nameBug
PDFNET-41154Exception when trying to flatten PDF fileBug
PDFNET-41162PDF to PDFA: transparent image issueBug
PDFNET-41168Modifying CheckBoxField border changes the checkmark sizeBug
PDFNET-41171PDF to PDF/A - Formatting issues in resultant fileBug
PDFNET-41172Vertical text rendering issue in read only fields with same nameBug
PDFNET-41174Vertical text is rendering as horizontal text in flatten PDF formBug
PDFNET-41175TIF to PDF: resultant PDF is emptyBug
PDFNET-41177PDF to PDF/A - Image is inverted in resultant fileBug
PDFNET-41197XPS to PDF - Missing contents in resultnat fileBug
PDFNET-41204Fill color issue with rounded corner rectangleBug
PDFNET-41248Exception when trying to flatten PDF form fieldsBug
PDFNET-41278Aspose PDF printing - character encoding for nordic charactersBug
PDFNET-41351PDF to DOCX: font issue in page footerBug
PDFNET-41366PDF to PDF/A - Resultant file is not compliantBug
PDFNET-41378PDF to PDF/A - Resultant file is not compliantBug
PDFNET-41379PDF to PDFA: resultant PDFA1a file does not fails PDFA conformance verificationBug
PDFNET-41396Replacing text does not rearrangeBug
PDFNET-41447Attachment is broken when using FileStreamBug
PDFNET-41453API throws NullReference Exception during optimizationBug
PDFNET-41458API hangs while saving PDF documentBug
PDFNET-41483PDF to JPEG: PDF page images are not rendering in resultant JPEG imagesBug
PDFNET-60408Aspose.PDF 25.7: Converting a particular PDF to JPG/TIFF results in corrupted characters in the output.Bug
PDFNET-61176Convert a PDF that contains XFA forms TO PDF and try to flatten it, the process fails and corrupts the fileBug
PDFNET-61219PDF to TIFF: incorrect output renderingBug
PDFNET-61646PDF to DOCX: Converting file raises an OverflowExceptionBug
PDFNET-61653Invalid font name when subsetting fonts on PDF with embedded bold font in TOCBug
PDFNET-61705Convert pdf to image results in notdef glyphs - .NET 10Bug
PDFNET-61777PDF to XPS conversion produces excessively large XPS for scanned PDFsBug
PDFNET-61900IncorrectFontUsageException is thrownBug
PDFNET-61931When opening with Acrobat document, that converted from XPS to PDF, an error message appears.Bug
PDFNET-61993Conversion of PDF => PDF/A_2B of a particular PDF file failsBug
PDFNET-61999PDF TO XPS: Cannot find table ‘post’ in the font file.Bug

Public API and Backward Incompatible Changes

Added APIs

No addings.

Removed APIs

No removings.

Backward Incompatible Changes

No changes.