-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ff10d2
commit cb7c700
Showing
2 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Examples/DocsExamples/DocsExamples/Getting started/Hello world.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Aspose.Words; | ||
using NUnit.Framework; | ||
|
||
namespace DocsExamples.Getting_started | ||
{ | ||
public class Hello_world : DocsExamplesBase | ||
{ | ||
[Test] | ||
public void HelloWorld() | ||
{ | ||
//ExStart:HelloWorld | ||
//GistDesc:Getting started example | ||
Document docA = new Document(); | ||
DocumentBuilder builder = new DocumentBuilder(docA); | ||
|
||
// Insert text to the document start. | ||
builder.MoveToDocumentStart(); | ||
builder.Write("First Hello World paragraph"); | ||
|
||
Document docB = new Document(MyDir + "Document.docx"); | ||
// Add document B to the and of document A, preserving document B formatting. | ||
docA.AppendDocument(docB, ImportFormatMode.KeepSourceFormatting); | ||
|
||
docA.Save(ArtifactsDir + "C:\\Temp\\output_AB.pdf"); | ||
//ExEnd:HelloWorld | ||
} | ||
} | ||
} |