Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells is a professional solution that allows you to generate PDF files from web pages and raw HTML code in your applications.
This article explains how to convert HTML to PDF. It covers the following topics.
How to convert HTML to PDF? With Aspose.Cells for C++ library, you can easily convert HTML to PDF programmatically with a few lines of code. Aspose.Cells for C++ is capable of building cross-platform applications with the ability to generate, modify, convert, render, and print all Excel files.
The following C++ code sample shows how to convert an HTML document to a PDF using Aspose.Cells for C++.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Create HTML load options
HtmlLoadOptions options(LoadFormat::Html);
// Load the HTML file into a workbook
U16String inputFilePath(u"sample.html");
Workbook book(inputFilePath, options);
// Save the workbook as PDF
U16String outputFilePath(u"out.pdf");
book.Save(outputFilePath);
std::cout << "HTML file converted to PDF successfully!" << std::endl;
Aspose::Cells::Cleanup();
}
Aspose.Cells for C++ presents you with an online free application “HTML to PDF”, where you may try to investigate the functionality and quality it works.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.