@@ -16,7 +16,7 @@ static void Main(string[] args)
16
16
//Hook the event to customize the image while importing Markdown.
17
17
document . MdImportSettings . ImageNodeVisited += MdImportSettings_ImageNodeVisited ;
18
18
//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 ) ;
20
20
21
21
//Create a file stream.
22
22
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.
30
30
{
31
31
//Set the image stream based on the image name from the input Markdown.
32
32
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 ) ;
34
34
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 ) ;
36
36
//Retrive the image from the website and use it.
37
37
else if ( args . Uri . StartsWith ( "https://" ) )
38
38
{
0 commit comments