こんにちは、世界!

Contents
[ ]

は、“Hello,World!「コードは、多くの場合、uisngを書く最初の簡単な例です」C++の場合Aspose.Wordsまた、ソースコードのコンパイルや実行を目的としたソフトウェアが正しくインストールされていることを確認するための健全性テストとしても使

“C++の場合Aspose.Words"ライブラリは、開発者が作成、変更、マージ、変換、WordやWeb文書を比較するための直接アクセスを提供します。 PDF, DOCX, DOC, RTF、ODT、EPUB、HTML、および他の多くのファイル形式は次のとおりです サポートされている.

Below codeスニペットは次の手順に従います:

  1. 新しい空のDocumentを作成します
  2. DocumentBuilderクラスを初期化する
  3. 文書にテキストを挿入する簡単なWriteメソッドを使用して開始します
  4. ファイルから既存のDocumentを開きます。 ファイル形式を自動的に検出
  5. Append文書"A"を文書"B"のandに変換します
  6. Save出力はPDFとして出力されます

次のコードスニペットは"Hello,World!“の出展作品例"C++の場合Aspose.Words"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");
view raw hello-world.h hosted with ❤ by GitHub