Browse our Products

Aspose.PDF for .NET 25.12

Improvements and Changes

Changes in .NET versions support

Since Aspose.PDF 25.12, we’ve added support for the latest .NET 10. At the same time, support for .NET 7 has ceased.

Features and Enhancements

The ability to create a logical structure from HTML tags has been added to meet accessibility requirements. This feature allows for creating tagged PDFs that are more accessible by defining reading order and marking up the content hierarchy. Set the HtmlLoadOptions.CreateLogicalStructure property to true to use this functionality.

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

    // Initialize HtmlLoadOptions
    Aspose.Pdf.HtmlLoadOptions options = new Aspose.Pdf.HtmlLoadOptions
    {
        // Convert HTML markup to PDF logical structure elements
        CreateLogicalStructure = true
    };

    // Open PDF document
    using (Aspose.Pdf.Document document = new Aspose.Pdf.Document(dataDir + "HTMLToPDF.html", options))
    {
        // Save PDF document
        document.Save(dataDir + "HtmlToPdfCreateLogicalStructure.pdf");
    }
}

A new capability to extract unsigned content from a digitally signed PDF has been introduced. This enhancement is implemented by the UnsignedContentAbsorber class, which detects changes to pages, form fields, annotations, and XForms that are not covered by a signature.

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

    // Open PDF document
    using (Document document = new Document(inputPdfFile))
    {
        // Create an instance of PdfFileSignature for working with signatures in the document
        using (PdfFileSignature signature = new PdfFileSignature(document))
        {
            // Create an instance of UnsignedContentAbsorber
            UnsignedContentAbsorber unsignedContent = new UnsignedContentAbsorber(signature);
            // Try to get unsigned content
            UnsignedContentAbsorber.Result result = unsignedContent.TryGetContent();

            // Print information about unsigned content
            Console.WriteLine(result.Message);
            Console.WriteLine(result.Coverage);
            Console.WriteLine(result.UnsignedContent.Pages.Count);
            Console.WriteLine(result.UnsignedContent.XForms.Count);
            Console.WriteLine(result.UnsignedContent.Forms.Count);
        }
    }
}

The Form Importer plugin has been implemented.

// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void FormImporterPlugin()
{
    var dataDir = RunExamples.GetDataDir_AsposePdf_WorkingDocuments();
    var inputPdf = dataDir + "input.pdf";
    var inputJson = dataDir + "input.json";
    var outputPdf = dataDir + "output.pdf";
    
    var options = new FormImporterJsonOptions();
    options.AddInput(new FileDataSource(inputPdf), new FileDataSource(inputJson));
    options.AddOutput(new FileDataSource(outputPdf));

    var importer = new FormImporter();
    var result = importer.Process(options);
}

The Timestamp plugin has been implemented.

// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void TimestampPlugin()
{
    var dataDir = RunExamples.GetDataDir_AsposePdf_SecuritySignatures();
    var inputPdf = dataDir + "input.pdf";
    var inputPfx = dataDir + "rsa_cert.pfx";
    var outputPdf = dataDir + "output.pdf";
    var timestampServerUrl = "http://timestamp.digicert.com";

    var options = new TimestampOptions(inputPfx, "12345")
    {
        ServerUrl = timestampServerUrl,
        BasicAuthCredentials = string.Empty
    };

    options.AddInput(new FileDataSource(inputPdf));
    options.AddOutput(new FileDataSource(outputPdf));

    using (var plugin = new Timestamp())
    {
        plugin.Process(options);
    }
}

Other notable enhancements

KeySummary
PDFNET-49491HTML to PDF - Unable to add alternate text in image and unable to set the reading order in pdf
PDFNET-49746Add an overload to XImageCollection to add a CCITT encoded black and white image
PDFNET-46122Support for PDF Version 2.0 (ISO 32000-2)
PDFNET-50874Accessibility tags are not being created using Aspose PDF for .net from HTML
PDFNET-58192Support Arbitrary Rotation Angles for Free Text Annotations in XFDF
PDFNET-60392Introduce ‘Form Importer’ Plugin Functionality
PDFNET-60393Introduce ‘TimeStamp’ Plugin Functionality
PDFNET-61171Bad performance when converting particular pages of PDF to PNG and HTML
PDFNET-43457Cannot add multiple text box fields with the same name

Bug Fixing and Other Changes

KeySummaryCategory
PDFNET-34965StripByteCount in TIFF image converted from PDFBug
PDFNET-35455Problem displaying Japanese text in FormFieldBug
PDFNET-36765XML to PDF - resultant PDF is 0kbBug
PDFNET-38048PDF to PDFA1b: Compliance failedBug
PDFNET-38064PDF to HTML - Resultant file contents are garbledBug
PDFNET-38104HTML to PDF - Incorrect table formattingBug
PDFNET-38123PDF to DOC: Table rendered incorrectlyBug
PDFNET-38171TextFragment settings for Font overrides child TextSegment bolding and fontsize formattingBug
PDFNET-38198Unable to convert XFA form to Standard formBug
PDFNET-38222PDF to image - Scrambled background layout in resultant fileBug
PDFNET-38258Text goes beyond the page after replacingBug
PDFNET-38279Image and text not appearing for Footer on subsequent pagesBug
PDFNET-38280Table Formatting issue in resultant fileBug
PDFNET-38310Long TOC entry is trimmed at the end and do not show the page associated page numberBug
PDFNET-38321PDF to Excel - Formatting issues in resultant fileBug
PDFNET-38324PDF to PDF/A-1B compliance failsBug
PDFNET-38329PDF to HTML: data missing in resultant HTML.Bug
PDFNET-38361Text replacement taking considerable timeBug
PDFNET-38412Merging PDF pages with annotations changes the author name in annotationsBug
PDFNET-38481IsInLineParagraph only works on first page FooterBug
PDFNET-38560PDF to HTML - ArgumentException during conversionBug
PDFNET-38567PDF to XPS - Exception during conversionBug
PDFNET-38606Form Field Vertical Alignment issueBug
PDFNET-38622Exception when trying to Optimize PDF fileBug
PDFNET-38641HtmlFragment does not honor list indentBug
PDFNET-38692HTML to PDF - Unable to set resultant file dimensionsBug
PDFNET-38704Aspose.PDF falls into some infinite loop when processing certain tables and imagesBug
PDFNET-38733Adding image background to PDF throws OutOfMemoryExceptionBug
PDFNET-38771XPS to PDF conversion is taking a long timeBug
PDFNET-38840Optimizing PDF file size before PDF to PDF/A conversion, generates corrupt outputBug
PDFNET-38931PCL (PRN) to PDF renders incorrect bold charatersBug
PDFNET-39022CallBackGetHocr is not working properlyBug
PDFNET-48374Unknown rotation angle ApplicationException occurs while importing annotations from XFDFBug
PDFNET-56607PDF to HTML conversion - whole file is a mailto linkBug
PDFNET-57206Text is missing when converting PDF to HTMLBug
PDFNET-38497XML to PDF: RepeatingRows add unwanted padding to first non repeating row on second pageBug
PDFNET-38727Extended Rights Features are lost during manipulationBug
PDFNET-38745Hyperlinks are not being added to PDF fileBug
PDFNET-59291Formatting of numbers, datetimes and money values is lost when converting PDF to HTMLBug
PDFNET-59294All numbers lack of slashes, points and zeros when converting PDF to HTMLBug
PDFNET-59866HTML to PDF: conversion causes System.InvalidOperationExceptionBug
PDFNET-60605Inconsistent Line Thickness with Dash Pattern AppliedBug
PDFNET-60814Aspose.PDF.Page CalculateContentBBox runs 20x slower in Debug modeBug
PDFNET-60896Aspose.PDF.Drawing: System.Drawing.Common dependency causes Linux runtime errorBug
PDFNET-60922Method ToString in the Operator class throws ArgumentNullExceptionBug
PDFNET-61203Regression: “Operand value is not a name” exceptionBug
PDFNET-61211Unclear exceptions during PDF/A conversionBug
PDFNET-61216“Supplied XPS file or stream is corrupt” thrown when loading valid XPSBug
PDFNET-61239Multiple font-related issues in PDFBug
PDFNET-61303Document.Save() method closes a stream after export to MarkdownBug
PDFNET-61380Symbols not rendered correctly after converting PDF to PPTXBug
PDFNET-38132Extended rights are not preserved when JavaScript added to field actionBug

Public API and Backward Incompatible Changes

Added APIs

  • Type: Aspose.Pdf.LowCode.FormImporter
  • Type: Aspose.Pdf.LowCode.FormImporterJsonOptions
  • Type: Aspose.Pdf.LowCode.FormJsonImportSource
  • Type: Aspose.Pdf.LowCode.Timestamp
  • Type: Aspose.Pdf.LowCode.TimestampOptions
  • Type: Aspose.Pdf.Security.UnsignedContentAbsorber
  • Type: Aspose.Pdf.Security.UnsignedContentAbsorber.Result
  • Type: Aspose.Pdf.Security.UnsignedContentAbsorber.UnsignedContent
  • Method: Aspose.Pdf.LowCode.FormImporter.#ctor System.Void
  • Method: Aspose.Pdf.LowCode.FormImporter.Process(Aspose.Pdf.LowCode.IPluginOptions) Aspose.Pdf.LowCode.ResultContainer
  • Method: Aspose.Pdf.LowCode.FormImporterJsonOptions.#ctor System.Void
  • Method: Aspose.Pdf.LowCode.FormImporterJsonOptions.AddInput(Aspose.Pdf.LowCode.IDataSource,Aspose.Pdf.LowCode.IDataSource) System.Void
  • Method: Aspose.Pdf.LowCode.FormImporterJsonOptions.AddOutput(Aspose.Pdf.LowCode.IDataSource) System.Void
  • Method: Aspose.Pdf.LowCode.FormJsonImportSource.#ctor(Aspose.Pdf.LowCode.IDataSource,Aspose.Pdf.LowCode.IDataSource) System.Void
  • Method: Aspose.Pdf.LowCode.Timestamp.#ctor System.Void
  • Method: Aspose.Pdf.LowCode.Timestamp.Dispose System.Void
  • Method: Aspose.Pdf.LowCode.Timestamp.Process(Aspose.Pdf.LowCode.IPluginOptions) Aspose.Pdf.LowCode.ResultContainer
  • Method: Aspose.Pdf.LowCode.TimestampOptions.#ctor(System.IO.Stream,System.String) System.Void
  • Method: Aspose.Pdf.LowCode.TimestampOptions.#ctor(System.String,System.String) System.Void
  • Method: Aspose.Pdf.Security.UnsignedContentAbsorber.#ctor(Aspose.Pdf.Facades.PdfFileSignature) System.Void
  • Method: Aspose.Pdf.Security.UnsignedContentAbsorber.TryGetContent Aspose.Pdf.Security.UnsignedContentAbsorber+Result
  • Property: Aspose.Pdf.ExportFieldsOptions.FieldSelector System.Predicate`1[[Aspose.Pdf.Forms.Field, Aspose.PDF, Version=25.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56]]
  • Property: Aspose.Pdf.HtmlLoadOptions.CreateLogicalStructure System.Boolean
  • Property: Aspose.Pdf.LowCode.FormImporterJsonOptions.Inputs System.Collections.Generic.IReadOnlyList`1[[Aspose.Pdf.LowCode.FormJsonImportSource, Aspose.PDF, Version=25.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56]]
  • Property: Aspose.Pdf.LowCode.FormImporterJsonOptions.Outputs System.Collections.Generic.List`1[[Aspose.Pdf.LowCode.IDataSource, Aspose.PDF, Version=25.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56]]
  • Property: Aspose.Pdf.LowCode.FormJsonImportSource.JsonSource Aspose.Pdf.LowCode.IDataSource
  • Property: Aspose.Pdf.LowCode.FormJsonImportSource.PdfSource Aspose.Pdf.LowCode.IDataSource
  • Property: Aspose.Pdf.LowCode.TimestampOptions.BasicAuthCredentials System.String
  • Property: Aspose.Pdf.LowCode.TimestampOptions.DigestHashAlgorithm Aspose.Pdf.DigestHashAlgorithm
  • Property: Aspose.Pdf.LowCode.TimestampOptions.OperationName System.String
  • Property: Aspose.Pdf.LowCode.TimestampOptions.PageNumber System.Int32
  • Property: Aspose.Pdf.LowCode.TimestampOptions.Rectangle System.Drawing.Rectangle
  • Property: Aspose.Pdf.LowCode.TimestampOptions.ServerUrl System.String
  • Property: Aspose.Pdf.LowCode.TimestampOptions.SigContact System.String
  • Property: Aspose.Pdf.LowCode.TimestampOptions.SigLocation System.String
  • Property: Aspose.Pdf.LowCode.TimestampOptions.SigReason System.String
  • Property: Aspose.Pdf.LowCode.TimestampOptions.Visible System.Boolean
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.Result.Coverage Aspose.Pdf.Signatures.SignaturesCoverage
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.Result.Message System.String
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.Result.Success System.Boolean
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.Result.UnsignedContent Aspose.Pdf.Security.UnsignedContentAbsorber+UnsignedContent
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.UnsignedContent.Annotations System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Aspose.Pdf.Annotations.Annotation, Aspose.PDF, Version=25.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56]]
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.UnsignedContent.Forms System.Collections.Generic.List`1[[Aspose.Pdf.Annotations.WidgetAnnotation, Aspose.PDF, Version=25.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56]]
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.UnsignedContent.Pages System.Collections.Generic.List`1[[Aspose.Pdf.Page, Aspose.PDF, Version=25.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56]]
  • Property: Aspose.Pdf.Security.UnsignedContentAbsorber.UnsignedContent.XForms System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[Aspose.Pdf.XForm, Aspose.PDF, Version=25.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56]]

Removed APIs

No removings.

Backward Incompatible Changes

  • Support for .NET 7 ceased.