Create PDF via C++
Native and high-performance PDF file creation without Adobe Acrobat installation using C++
How to generate PDF File via C++
In order to create a PDF file, we’ll use Aspose.PDF for C++ API which is a feature-rich, powerful, and easy-to-use document manipulation API for cpp platform. Open NuGet package manager, search for Aspose.PDF and install. You may also use the following command from the Package Manager Console.
How to Create PDF via C++
It is easy for the developers to create, load, modify and convert PDF files directly from C++ application in just a few lines of code.
- Include the namespace in your class file
- Initialize the Document class object.
- Add a page using Pages.Add() method.
- Create a new TextFragment object and set its text.
- Add TextFragment to the Paragraphs collection of the page.
- Save the PDF using Save(String) method.