Convert XPS to PDF/A
Our latest release of NiXPS SDK v2.6.3 features the ability to convert XPS to PDF/A
. PDF/A-1b - Level B compliance in Part 1 to be precise.
To enable this, we have introduced a new API call: NOPackage.exportToPDFWithOptions.
It takes in an NOOptions object instance, which is an object that allows you to control aspects of the XPS to PDF conversion process. It contains key/value pairs, which can be set by means of the NOOptions.setOption(key,value) call.
Here is a code sample that demonstrates the conversion to PDF/A:
NOPackage lPackage = NOPackage.readPackageFromFile("in.xps");
NOOptions lOptions = new NOOptions();
NOProgressReporter lReporter = new NOProgressReporter();
lPackage.exportToPDFWithOptions("out.pdf", lReporter, lOptions);
Of course, this is supported in our C/C++ API (Mac OSX & Windows 32/54 bit), but is also available in C#, VB.NET and the other .NET based languages.
If you are working with the Windows Presentation Foundation, it is now very easy to convert your XAML content, via an XPSDocumentWriter, to PDF/A, by means of the NiXPS SDK.