How to Convert HTML to PDF using C++

In this example, we are going to see how to convert HTML to PDF using C++. HTML to PDF conversion is frequently required feature and you can easily achieve this by writing few lines of code in C++.

Steps to Convert HTML to PDF using C++

  1. Use Aspose.Words.Cpp NuGet package
  2. Include reference to Aspose::Words and Saving namespaces
  3. Create a new Document Class instance
  4. Save the HTMl to PDF in C++ by using Save method

In the following example, you can easily render HTML to PDF using C++ without any external dependencies and with few simple steps and code.

Code to Convert HTML to PDF using C++

In previous example, we learnt How to Create Word Document in C++. Now, we have seen how in C++, HTML to PDF is rendered. This example makes creating word document a lot easier and quicker along with no dependency on Microsoft platform.

 English