Aspose.Html-Cloud.Cpp
20.8.0
dotnet add package Aspose.Html-Cloud.Cpp --version 20.8.0
NuGet\Install-Package Aspose.Html-Cloud.Cpp -Version 20.8.0
<PackageReference Include="Aspose.Html-Cloud.Cpp" Version="20.8.0" />
paket add Aspose.Html-Cloud.Cpp --version 20.8.0
#r "nuget: Aspose.Html-Cloud.Cpp, 20.8.0"
// Install Aspose.Html-Cloud.Cpp as a Cake Addin #addin nuget:?package=Aspose.Html-Cloud.Cpp&version=20.8.0 // Install Aspose.Html-Cloud.Cpp as a Cake Tool #tool nuget:?package=Aspose.Html-Cloud.Cpp&version=20.8.0
HTML Rendering & Conversion C++ Cloud SDK
Aspose.HTML Cloud SDK for C++ provides developers with powerful tools to build cloud-based applications for HTML rendering, conversion, and processing. The SDK supports converting HTML files to multiple formats including PDF, DOCX, MHTML, XPS, and various image formats like JPEG, PNG, and TIFF. Whether working with HTML files stored in the cloud or locally, C++ developers can seamlessly integrate custom conversion options like page size, margins, and output formats. Aspose.HTML Cloud SDK also supports advanced features like metadata extraction and vectorization of raster images, enabling high-quality document handling in C++ environments. With easy installation via NuGet or GitHub, developers can quickly get started and leverage cloud-based HTML processing capabilities.
HTML Converter
Multi-format Conversion
Convert HTML to PDF, DOCX, MHTML, XPS, and images.
Cloud & Local Support
Convert HTML from cloud storage, local files, or URLs.
Custom Conversion Options
Define margins, page size, and output format.
Convert HTML to PDF
Precise PDF Conversion
Convert HTML to PDF with adjustable settings.
Page Layout Control
Define page size, orientation, and margins.
Web-to-PDF Support
Convert web pages to high-quality PDF format.
Convert HTML to XPS
HTML to XPS Conversion
Generate print-ready XPS documents from HTML.
Customizable XPS Output
Set page size and margins for XPS files.
Web & Cloud Support
Convert HTML from URLs or cloud storage to XPS.
Convert HTML to DOCX
HTML to DOCX Conversion
Create editable DOCX files from HTML content.
Flexible Layout Options
Adjust margins and page size for DOCX.
Cloud & Local Conversion
Convert web pages, local files, or cloud-stored HTML to DOCX.
Convert HTML to Image
HTML to Image Conversion
Generate JPEG, PNG, GIF, TIFF, or BMP from HTML.
Snapshot Support
Capture web page snapshots as images.
Custom Image Settings
Control image size and resolution during conversion.
Convert HTML to MHTML
HTML to MHTML Conversion
Archive web content in MHTML format.
Custom Conversion Options
Set specific preferences for MHTML output.
Cloud & Local Support
Convert HTML from URLs or cloud storage to MHTML.
Convert HTML to Markdown
HTML to Markdown Conversion
Simplify HTML to Markdown conversion for sharing.
Cloud Storage Support
Convert HTML from cloud storage or local files.
Efficient Conversion Process
Streamline Markdown generation from HTML.
EPUB Converter
HTML to EPUB Conversion
Transform web content into EPUB for eBooks.
Cloud-based EPUB Creation
Convert HTML stored in cloud storage to EPUB.
Multi-format Support
Create digital publications from various formats.
MHTML Converter
MHTML to Multi-format
Convert MHTML to PDF, DOCX, and images.
Flexible Storage Options
Convert MHTML from cloud or local storage.
Custom Output Control
Adjust MHTML conversion settings.
Markdown Converter
Markdown to DOCX & PDF
Convert Markdown files to formal document formats.
Cloud or Local Conversion
Convert from cloud or local storage with ease.
Lightweight to Formal
Manage Markdown files for formal documentation.
XHTML Converter
XHTML to Multi-format
Convert XHTML to PDF, DOCX, and images.
Flexible Conversion Options
Customize page size and orientation for conversions.
Cloud & Local Support
Convert XHTML from local or cloud storage.
SVG Converter
SVG to Image Conversion
Convert vector graphics to PNG, JPEG, and TIFF.
Vector to Image Control
Preserve vector quality in image conversions.
Web & Cloud Support
Convert SVG files stored locally or in cloud storage.
Image Vectorization
Raster to Vector
Convert raster images to SVG vector graphics.
Scalable Image Conversion
Create high-quality vector images from low-res sources.
Custom Vectorization
Adjust vectorization settings for precise results.
Conversion Options
Customizable Conversion Settings
Define page size, margins, and format for all conversions.
Detailed Output Control
Tailor conversion settings for HTML to PDF, DOCX, XPS, and images.
API Integration
Use flexible API options for advanced conversion customization.
Supported File Formats
Format | Description | Load | Save | Remarks |
---|---|---|---|---|
HTML | HTML format | ✔️ | ✔️ | |
XHTML | HTML with XML syntax | ✔️ | ✔️ | Save option is only available when the input file is XHTML |
MHTML | MHTML (Web archive) format | ✔️ | ✔️ | Save option is only available for an MHTML document saving |
EPUB | E-book file format | ✔️ | ||
MD | Markdown Format | ✔️ | ✔️ | Save option is only available for an HTML document saving |
Saves a document in PDF format | ✔️ | |||
XPS | Saves a document in XPS (XML Paper Specification) format | ✔️ | ||
DOCX | Saves a document in DOCX format | ✔️ | ||
TIFF | Renders a page or pages of a document into TIFF | ✔️ | Single or multi-page TIFF file | |
JPEG | Renders a page of a document and saves it as a JPEG file | ✔️ | ||
PNG | Renders a page of a document and saves it as a PNG file | ✔️ | ||
BMP | Renders a page of a document and saves it as a BMP file | ✔️ | ||
GIF | Renders a page of a document and saves it as a GIF file | ✔️ |
Installation of Aspose.HTML Cloud SDK for C++
1. Create an Aspose Cloud Account
- Visit Aspose Cloud Dashboard and register.
- Create or look up your App Key and SID for API authentication.
- Enjoy the free quota available for use.
2. Install SDK via Command Line
Open your command line or terminal and run the following:
PM> Install-Package Aspose.Html-Cloud.Cpp
3. Clone SDK from GitHub
If you prefer to load the SDK from GitHub, run:
git clone https://github.com/aspose-html-cloud/aspose-html-cloud-cpp.git cd aspose-html-cloud-cpp
Convert HTML Web Page to PDF
This code demonstrates how to convert an HTML file into a high-quality PDF format using the Aspose.HTML Cloud API in C++.
// Get current directory
std::string cur_dir(argv[0]);
int pos = cur_dir.find_last_of("/\\");
cur_dir = cur_dir.substr(0, pos + 1); // Include the last slash
std::wstring w_cur_dir(cur_dir.begin(), cur_dir.end());
const utility::string_t clientId = L"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
const utility::string_t clientSecret = L"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const utility::string_t basePath = L"https://api.aspose.cloud/v4.0";
const utility::string_t authPath = L"https://api.aspose.cloud/connect/token";
// Create configuration for authorization
std::shared_ptr<ApiConfiguration> apiConfig(new ApiConfiguration(clientId, clientSecret, basePath, authPath));
// Create client from configuration
std::shared_ptr<ApiClient> apiClient(new ApiClient(apiConfig));
// Create ConversionApi
std::shared_ptr<ConversionApi> api = std::make_shared<ConversionApi>(apiClient);
// File name for conversion
utility::string_t src = L"https://example.com";
utility::string_t dst = w_cur_dir + L"result.pdf";
//Conversion
auto result = api->convertUrlToLocal(src, dst);
// Check the result file
auto re = result->getFile();
std::ifstream f(re.c_str());
if(!f.good())
{
throw std::runtime_error("Conversion failed");
}
Convert HTML Web Page to MHTML
Convert HTML documents into MHTML format, archiving web content for offline viewing.
// Get current directory
std::string cur_dir(argv[0]);
int pos = cur_dir.find_last_of("/\\");
cur_dir = cur_dir.substr(0, pos + 1); // Include the last slash
std::wstring w_cur_dir(cur_dir.begin(), cur_dir.end());
const utility::string_t clientId = L"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
const utility::string_t clientSecret = L"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const utility::string_t basePath = L"https://api.aspose.cloud/v4.0";
const utility::string_t authPath = L"https://api.aspose.cloud/connect/token";
// Create configuration for authorization
std::shared_ptr<ApiConfiguration> apiConfig(new ApiConfiguration(clientId, clientSecret, basePath, authPath));
// Create client from configuration
std::shared_ptr<ApiClient> apiClient(new ApiClient(apiConfig));
// Create ConversionApi
std::shared_ptr<ConversionApi> api = std::make_shared<ConversionApi>(apiClient);
// File name for conversion
utility::string_t src = L"https://example.com";
utility::string_t dst = w_cur_dir + L"result.mhtml";
//Conversion
auto result = api->convertUrlToLocal(src, dst);
// Check the result file
auto re = result->getFile();
std::ifstream f(re.c_str());
if(!f.good())
{
throw std::runtime_error("Conversion failed");
}
Vectorize PNG Image with Default Save Options
Converting a local raster image file to PDF format and saving the output to the local file system using the default vectorization settings.
// Get current directory
std::string cur_dir(argv[0]);
int pos = cur_dir.find_last_of("/\\");
cur_dir = cur_dir.substr(0, pos + 1); // Include the last slash
std::wstring w_cur_dir(cur_dir.begin(), cur_dir.end());
const utility::string_t clientId = L"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
const utility::string_t clientSecret = L"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const utility::string_t basePath = L"https://api.aspose.cloud/v4.0";
const utility::string_t authPath = L"https://api.aspose.cloud/connect/token";
// Create configuration for authorization
std::shared_ptr<ApiConfiguration> apiConfig(new ApiConfiguration(clientId, clientSecret, basePath, authPath));
// Create client from configuration
std::shared_ptr<ApiClient> apiClient(new ApiClient(apiConfig));
// Create ConversionApi
std::shared_ptr<ConversionApi> api = std::make_shared<ConversionApi>(apiClient);
// File name for conversion
utility::string_t src = w_cur_dir + L"input.png";
utility::string_t dst = w_cur_dir + L"result.pdf";
// Conversion
auto result = api->convertLocalToLocal(src, dst);
// Check the result file
auto re = result->getFile();
std::ifstream f(re.c_str());
if(!f.good())
{
throw std::runtime_error("Conversion failed");
}
Tags
HTML to PDF C++ API | C++ Cloud SDK | HTML to DOCX API | MHTML Conversion API | SVG Vectorization API | C++ REST API | Cloud Storage Integration | Document Conversion SDK | Metadata Extraction API | HTML to Image API | Markdown to PDF API | XPS Conversion API | Vectorization API | C++ HTML Processing | API Integration | C++ SDK Support
Product | Versions Compatible and additional computed target framework versions. |
---|---|
native | native is compatible. |
-
- boost (>= 1.72.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
20.8.0 | 2,510 | 7/31/2020 |
Added
SEO API:
- Get SEO warnings by url
- Check validation html by url
Conversion API
- Markdown to HTML conversion