22using Syncfusion . DocIO . DLS ;
33using Syncfusion . Drawing ;
44using System . IO ;
5+ using System . Net ;
56
67namespace Customize_image
78{
@@ -15,7 +16,7 @@ static void Main(string[] args)
1516 //Hook the event to customize the image while importing Markdown.
1617 document . MdImportSettings . ImageNodeVisited += MdImportSettings_ImageNodeVisited ;
1718 //Open the Markdown file.
18- document . Open ( " Input.md") ;
19+ document . Open ( new FileStream ( "../../../ Input.md", FileMode . Open , FileAccess . Read ) , FormatType . Markdown ) ;
1920
2021 //Create a file stream.
2122 using ( FileStream outputFileStream = new FileStream ( Path . GetFullPath ( @"../../../Sample.docx" ) , FileMode . Create , FileAccess . ReadWrite ) )
@@ -29,9 +30,9 @@ private static void MdImportSettings_ImageNodeVisited(object sender, Syncfusion.
2930 {
3031 //Set the image stream based on the image name from the input Markdown.
3132 if ( args . Uri == "Image_1.png" )
32- args . ImageStream = new FileStream ( "Image_1.png" , FileMode . Open ) ;
33+ args . ImageStream = new FileStream ( "../../../ Image_1.png" , FileMode . Open ) ;
3334 else if ( args . Uri == "Image_2.png" )
34- args . ImageStream = new FileStream ( "Image_2.png" , FileMode . Open ) ;
35+ args . ImageStream = new FileStream ( "../../../ Image_2.png" , FileMode . Open ) ;
3536 //Retrive the image from the website and use it.
3637 else if ( args . Uri . StartsWith ( "https://" ) )
3738 {
0 commit comments