We are very much excited to announce the release of Aspose.PDF for .NET 9.7.0 which has brought many useful features including converting PDF to PDF/A-2A, creating internal links to PDF attachments, enhanced text formatting and many more. Every new release is more powerful, reliable and performance optimized compared to previous versions. To benefit the latest features, we always encourage our customers to migrate to the latest release.
PDF to PDF/A-2A Conversion
Aspose.PDF for .NET has been supporting conversion from PDF to PDF/A compliant documents and also offers the capability to validate a PDF file’s PDF/A compliance. In this release, we have added support for the conversion of PDF to PDF/A_2A format. Therefore a new value PDF_A_2A is added to PdfFormat enumeration. Please try using the following code snippet to accomplish this requirement.
// Load PDF file Document doc = new Aspose.Pdf.Document("input.pdf"); // Set PDF/A compliance as PDF/A_1a doc.Convert(new MemoryStream(), PdfFormat.PDF_A_2A, ConvertErrorAction.Delete); // Save updated document doc.Save("compliant.pdf");
Create Internal Link to Already Attached Files
PDF to HTML - Set Output File Size (Dimensions)
HTML to PDF and PDF to HTML conversion are some of the main features that the development team is working to improve and in recent releases, we have made significant improvements to them. In the current release, we offer the new capability to set the output file dimensions when converting a PDF file to HTML format. The PdfPageEditor class present in the Aspose.Pdf.Facades namespace provides the feature to update/manipulate pages of PDF document. It also offers the feature to set/update page dimensions of input PDF file. In order to accomplish our requirement, we can first load the source PDF document into PdfPageEditor object, update page dimensions and then render the output in HTML format using HtmlSaveOptions class. For further details, please visit PDF to HTML - Set Output File Size.
Add SVG Object to Table Cell
Aspose.Pdf for .NET supports the feature to add table cell inside PDF file. While creating table inside PDF file, we can add text or images inside table cells. Furthermore, this API also offers the feature to convert SVG files to PDF format. So with a blend of both features, we can accomplish the requirement of loading SVG image and add it inside table cells. For further details, please visit Add SVG Object to Table Cell.
Set TextFragment Formatting as Underline
A PDF file consists of elements such as Text, Images, Attachments, Annotations, Hyperlinks, Tables etc. When adding Text string to PDF file, we may have a requirement to set formatting for text instance. The latest release of Aspose.Pdf for .NET 9.7.0 offers the feature to set Underline formatting for TextFragment when adding to PDF file. Please try setting TextState.Underline property as true to accomplish this requirement.
Add Choice Option in Combobox Field
In case you need to add choice option to combo-box field in XFA form, then you need to update the XML template of the document so that the choice is added.
Document doc = new Document("37348.pdf"); string fields = doc.Form.XFA.FieldNames; XmlNode node = doc.Form.XFA.GetFieldTemplate(fields); XmlNode items = node.SelectSingleNode("tpl:items", doc.Form.XFA.NamespaceManager); XmlNode item = items.OwnerDocument.CreateNode(XmlNodeType.Element, "text", items.NamespaceURI); item.InnerText = "Choice # 4 ( New )"; items.AppendChild(item); doc.Save("37348-out.pdf");
Among the above stated new features/enhancements, there are numerous other features introduced in this release. We have also made fixes for issues reported in earlier releases. Please get a chance to download and try using the latest release of Aspose.PDF for .NET 9.7.0