How to Render XSL FO to PDF File using C++

In this tutorial, we will learn how to render Xsl Fo to PDF file using C++. The Xsl Fo file contains XML style sheet formatting which is used to generate a PDF file with a few simple API calls in C++. The feature does not need installation of Adobe Acrobat or any application on Windows or Linux platforms.

Steps to Render Xsl Fo to PDF File using C++

  1. Install the Aspose.Pdf for C++ library from NuGet package manager
  2. Add the reference to Aspose::Pdf namespace
  3. Initialize an object of XslFoLoadOptions class to load input file
  4. Load the input Xsl Fo file using the Document class
  5. Convert the Xsl Fo to PDF file with the Save method

You can convert Xsl Fo to PDF file using C++ with a couple of lines of code. It can generate Xsl Fo to PDF file using C++ efficiently with XslFoLoadOptions object.

Code to Render Xsl Fo to PDF File using C++

In the previous topic, we learned How to Read Bookmarks in PDF File using C++. This topic covers how using C++ export Xsl Fo to PDF file.

 English