Skip to content

Commit a0ac03a

Browse files
Merge pull request #234 from VijayadharshiniMathiyalagan/main
ES-906129 - Resolved the issue in the DocIo github samples
2 parents 0ec1060 + b08dbf8 commit a0ac03a

File tree

5 files changed

+3
-3
lines changed

5 files changed

+3
-3
lines changed

Markdown-to-Word-conversion/Customize-image/.NET/Customize-image/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static void Main(string[] args)
1616
//Hook the event to customize the image while importing Markdown.
1717
document.MdImportSettings.ImageNodeVisited += MdImportSettings_ImageNodeVisited;
1818
//Open the Markdown file.
19-
document.Open(new FileStream("Data/Input.md", FileMode.Open, FileAccess.Read), FormatType.Markdown);
19+
document.Open(new FileStream(Path.GetFullPath("Data/Input.md"), FileMode.Open, FileAccess.Read), FormatType.Markdown);
2020

2121
//Create a file stream.
2222
using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Sample.docx"), FileMode.Create, FileAccess.ReadWrite))
@@ -30,9 +30,9 @@ private static void MdImportSettings_ImageNodeVisited(object sender, Syncfusion.
3030
{
3131
//Set the image stream based on the image name from the input Markdown.
3232
if (args.Uri == "Image_1.png")
33-
args.ImageStream = new FileStream("Data/Image_1.png", FileMode.Open);
33+
args.ImageStream = new FileStream(Path.GetFullPath("Data/Image_1.png"), FileMode.Open);
3434
else if (args.Uri == "Image_2.png")
35-
args.ImageStream = new FileStream("Data/Image_2.png", FileMode.Open);
35+
args.ImageStream = new FileStream(Path.GetFullPath("Data/Image_2.png"), FileMode.Open);
3636
//Retrive the image from the website and use it.
3737
else if (args.Uri.StartsWith("https://"))
3838
{
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)