Merge XSLFO via C#
Merge XSLFO documents in a browser without needing Adobe Acrobat or Automation with C#.
Merge XSLFO files Using .NET
In order to merge XSLFO file, we’ll use Aspose.PDF for .NET API which is a feature-rich, powerful, and easy-to-use document manipulation API for net platform. A peculiar feature of Aspose.PDF is an API for combining XSLFO. The trait of this approach is that you only need to open the NuGet, search for Aspose.PDF, and install it without any special complex settings. Our .NET Library can convert a document from any supported download format to any supported save format. Aspose.PDF for .NET library provides fairly universal solutions that will help you solve the tasks of converting documents. Aspose.PDF supports the largest number of popular document formats, both for loading and saving. Draw your attention that the current section describes only popular conversions. The current page provides information about converting the format to format. However, there are many combinations for converting your files. For a complete list of supported formats, see the section Supported File Formats. Check the details of Installing the Library on the Documentation pages. You may also use the following command from the Package Manager Console.
Package Manager Console Command
PM > Install-Package Aspose.PDF
Convert XSLFO in C#
Try our XSLFO Converter to efficiently convert your documents. Convert XSLFO files programmatically. Choose from over 48 available formats to create your own convertible document. You can also convert to many other available formats. Converting XSLFO is just one of the ways our tool can convert your files. XSLFO conversion may seem complicated until you try a professional tool to do this task. Use C# to convert XSLFO files with maximum quality and speed.How to Merge XSLFO files via C#
You need Aspose.PDF for .NET to try the code in your environment.
- Open first document.
- Open second document.
- Add pages of second document to the first.
- Save concatenated output file
System Requirements
Just make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with .NET Framework, .NET Core, and PHP, VBScript, Delphi, C++ via COM Interop.
- Development environment like Microsoft Visual Studio.
- Aspose.PDF for .NET DLL referenced in your project.
C# - example code to merge XSLFO file.
// Instantiate XslFoLoadOption object
var options = new XslFoLoadOptions("employees.xslt");
// Set error handling strategy
options.ParsingErrorsHandlingType = XslFoLoadOptions.ParsingErrorsHandlingTypes.ThrowExceptionImmediately;
// Create Document object
var document1 = new Aspose.Pdf.Document("employees1.xml", options);
var document2 = new Aspose.Pdf.Document("employees2.xml", options);
// Add pages of second document to the first
document1.Pages.Add(document2.Pages);
document.Save(_dataDir+"ConcatenatedPDF.pdf");