@@ -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 {
0 commit comments