Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
A “Hello, World!” code is often the first simple example to write uisng “Aspose.Words for C++”, and it can also be used as a sanity test to ensure the software intended to compile or run source code is correctly installed.
“Aspose.Words for C++” library gives developers direct access to create, modify, merge, convert, compare Word and Web documents. PDF, DOCX, DOC, RTF, ODT, EPUB, HTML and many other file formats are supported.
Below code snippet follows these steps:
The following code snippet is a “Hello, World!” example to exhibit working of “Aspose.Words for C++” API:
// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-C.git. | |
auto docA = MakeObject<Document>(); | |
auto builder = MakeObject<DocumentBuilder>(docA); | |
// Insert text to the document start. | |
builder->MoveToDocumentStart(); | |
builder->Write(u"First Hello World paragraph"); | |
auto docB = MakeObject<Document>(MyDir + u"Document.docx"); | |
// Add document B to the and of document A, preserving document B formatting. | |
docA->AppendDocument(docB, ImportFormatMode::KeepSourceFormatting); | |
docA->Save(ArtifactsDir + u"HelloWorld.SimpleHelloWorld.pdf"); |
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.