Skip to content

Commit ab6accc

Browse files
Merge pull request #223 from Yaminisrisf4389/main
ES-907669-Modify DocIO GitHub examples repository for document processing playground
2 parents ff01896 + c6a491f commit ab6accc

File tree

148 files changed

+446
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+446
-70
lines changed

Paragraphs/Add-ole-object/.NET/Add-ole-object/Add-ole-object.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,16 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<None Update="Data\Book.xlsx">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
<None Update="Data\Image.png">
18+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
19+
</None>
20+
<None Update="Output\.gitkeep">
21+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
22+
</None>
23+
</ItemGroup>
24+
1325
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Paragraphs/Add-ole-object/.NET/Add-ole-object/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ static void Main(string[] args)
1616
//Adds new paragraph to the section.
1717
IWParagraph paragraph = section.AddParagraph();
1818
//Opens the file to be embedded.
19-
using (FileStream fileStream = new FileStream(Path.GetFullPath(@"../../../Data/Book.xlsx"), FileMode.Open, FileAccess.ReadWrite))
19+
using (FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/Book.xlsx"), FileMode.Open, FileAccess.ReadWrite))
2020
{
2121
//Loads the picture instance with the image need to be displayed.
2222
WPicture picture = new WPicture(document);
23-
FileStream imageStream = new FileStream(Path.GetFullPath(@"../../../Data/Image.png"), FileMode.Open, FileAccess.ReadWrite);
23+
FileStream imageStream = new FileStream(Path.GetFullPath(@"Data/Image.png"), FileMode.Open, FileAccess.ReadWrite);
2424
picture.LoadImage(imageStream);
2525
//Sets height and width for the image.
2626
picture.Height = 80;
2727
picture.Width = 80;
2828
//Appends the OLE object to the paragraph.
2929
WOleObject oleObject = paragraph.AppendOleObject(fileStream, picture, OleObjectType.ExcelWorksheet);
3030
//Creates file stream.
31-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
31+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
3232
{
3333
//Saves the Word document to file stream.
3434
document.Save(outputFileStream, FormatType.Docx);

Paragraphs/Add-paragraph/.NET/Add-paragraph/Add-paragraph.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<None Update="Output\.gitkeep">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
</ItemGroup>
18+
1319
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Paragraphs/Add-paragraph/.NET/Add-paragraph/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static void Main(string[] args)
1818
//Adds new text to the paragraph.
1919
paragraph.AppendText("Adding new paragraph to the document");
2020
//Creates file stream.
21-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
21+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
2222
{
2323
//Saves the Word document to file stream.
2424
document.Save(outputFileStream, FormatType.Docx);

Paragraphs/Add-svg-image/.NET/Add-svg-image/Add-svg-image.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,16 @@
1212
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1313
</ItemGroup>
1414

15+
<ItemGroup>
16+
<None Update="Data\Buyers.png">
17+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
18+
</None>
19+
<None Update="Data\Buyers.svg">
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
21+
</None>
22+
<None Update="Output\.gitkeep">
23+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
24+
</None>
25+
</ItemGroup>
26+
1527
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+


Paragraphs/Add-svg-image/.NET/Add-svg-image/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ static void Main(string[] args)
1616
//Add new paragraph to the section.
1717
IWParagraph firstParagraph = section.AddParagraph();
1818
//Get the image as byte array.
19-
byte[] imageBytes = File.ReadAllBytes(Path.GetFullPath(@"../../../Data/Buyers.png"));
19+
byte[] imageBytes = File.ReadAllBytes(Path.GetFullPath(@"Data/Buyers.png"));
2020
//Get the SVG image as byte array.
21-
byte[] svgData = File.ReadAllBytes(Path.GetFullPath(@"../../../Data/Buyers.svg"));
21+
byte[] svgData = File.ReadAllBytes(Path.GetFullPath(@"Data/Buyers.svg"));
2222
//Add SVG image to the paragraph.
2323
IWPicture picture = firstParagraph.AppendPicture(svgData, imageBytes);
2424
//Set height and width for the image.
2525
picture.Height = 100;
2626
picture.Width = 100;
2727

2828
//Create a file stream.
29-
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"../../../Result.docx"), FileMode.Create, FileAccess.ReadWrite))
29+
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite))
3030
{
3131
//Save the Word document to file stream.
3232
document.Save(outputFileStream, FormatType.Docx);

Paragraphs/Add-symbols/.NET/Add-symbols/Add-symbols.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@
1010
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<None Update="Output\.gitkeep">
15+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
16+
</None>
17+
</ItemGroup>
18+
1319
</Project>

0 commit comments

Comments
 (0)