We are pleased to announce the release of Aspose.PDF for .NET 16.12.0. A new feature, the support of PDF/A_2U standard along with number of enhancements and improvements are included in this release. Some of the enhancements are improved PDF Optimization and support of XML stream conversion to PDF. It also contains number of fixes of bugs reported in previous versions by our valued customers, which makes it more stable release as compared to previous releases. Some of them are PDF to PPTX conversion issues, PDF to PDFA standard conversion issues along with many other bug fixes. Please check the detailed release notes of Aspose.PDF for .NET 16.12.0, in order to get an idea about the new features/enhancements and fixed bugs in this release of Aspose.Pdf for .NET.

Furthermore, If you are planning to upgrade the API from any previous version, we strongly recommend you to check the Public API Changes section of current release and other intermediate releases from release notes pages, to know what has been changed since your current revision of the API.

The following sections describe some details regarding these newly added features/enhancements.

PDF Optimization - Improved

In this release, we have improved the PDF optimization feature with the introduction of some new properties in OptimizationOption class. Mainly resizing of the embedded images reduces the PDF file size, ResizeImages and MaxResolution properties for the purpose along with RemovePrivateInfo:

 Aspose.Pdf.Document document = new Aspose.Pdf.Document(inFile);
document.OptimizeResources(new Aspose.Pdf.Document.OptimizationOptions()
{
LinkDuplcateStreams = true,
RemoveUnusedObjects = true,
RemoveUnusedStreams = true,
CompressImages = true,
ResizeImages = true,
RemovePrivateInfo = true,
ImageQuality = 50,
MaxResoultion = 75
});

.... 

Support of PDF/A_2U Standard

We have introduced new PDFA standard, PDF/A_2U, in Aspose.Pdf for .NET 16.12.0. We have included a new value PDF_A_2U in PdfFormt enum. Please check following code snippet for new feature.

string inFile = "Input.pdf";
string outFile = "Output.pdf";
string outLog = "log.xml";
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(inFile);
PdfFormatConversionOptions opts = new PdfFormatConversionOptions(outLog, PdfFormat.PDF_A_2U, ConvertErrorAction.Delete);
doc.Convert(opts);
doc.Save(outFile);

Convert XML Stream using C#

Some of customers have requirements to render XML stream to PDF instead of file. So we have introduced a new constructor of BindXml() that support the Stream parameter.

string inXml = "sample.xml";
string inXslt = "sample.xslt";
string outFile = "output.pdf";
Aspose.Pdf.Document doc = new Aspose.Pdf.Document();
doc.BindXml(new FileStream(inXml, FileMode.OpenOrCreate), new FileStream(inXslt, FileMode.OpenOrCreate));
doc.Save(outFile);

Support of HTML Text Conversion in XML to PDF

Recently, we have introduced a new XML schema of Aspose.Pdf(new generator). XSD includes in MSI installer. We have introduced HTML text support in new XML schema with this release. Here is sample XML and code for the conversion:

Sample XML

<?xml version='1.0' encoding='utf-8'?>
<Document xmlns="Aspose.Pdf">
<Page>
<HtmlFragment>some text<Hyperlink URL="www.google.com" /></HtmlFragment>
</Page>
</Document>

Sample Code

string inXml = "sample.xml";
string outFile = "output.pdf";
Aspose.Pdf.Document doc = new Aspose.Pdf.Document();
doc.BindXml(inXml);
doc.Save(outFile);

Aspose.PDF for .NET Resources

The following resources will help you work with Aspose.Pdf for .NET: