Skip to content

Commit 4e57e39

Browse files
Modified the template and code snippet
1 parent 9b0d7c0 commit 4e57e39

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Markdown-to-Word-conversion/Modify-image-size/Modify-image-size/Data/Input.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
![Road](Road-550.png)
77

88

9-
**Product No:** BK\-M68B\-38
109

1110
**Size:** 38
1211

@@ -18,7 +17,6 @@
1817
![Mountain](https://www.syncfusion.com/downloads/support/directtrac/general/Mountain-300-989274178.png)
1918

2019

21-
**Product No:** BK\-M47B\-38
2220

2321
**Size:** 35
2422

Markdown-to-Word-conversion/Modify-image-size/Modify-image-size/Program.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
using Syncfusion.DocIO;
33
using System.Net;
44

5-
// Create a Word document instance.
6-
using (WordDocument document = new WordDocument())
5+
using (FileStream inputFileStream = new FileStream(Path.GetFullPath(@"Data/Input.md"), FileMode.Open, FileAccess.Read))
76
{
8-
// Hook the event to customize the image while importing Markdown.
9-
document.MdImportSettings.ImageNodeVisited += MdImportSettings_ImageNodeVisited;
10-
using (FileStream inputFileStream = new FileStream(Path.GetFullPath(@"Data/Input.md"), FileMode.Open, FileAccess.Read))
7+
// Create a Word document instance.
8+
using (WordDocument document = new WordDocument())
119
{
10+
// Hook the event to customize the image while importing Markdown.
11+
document.MdImportSettings.ImageNodeVisited += MdImportSettings_ImageNodeVisited;
1212
// Open the input Markdown file.
1313
document.Open(inputFileStream, FormatType.Markdown);
14-
// Find all images with the alternative text "Mountain" and resize them.
14+
// Find a picture by its alternative text and resize it.
1515
WPicture picture = document.FindItemByProperty(EntityType.Picture, "AlternativeText", "Mountain") as WPicture;
1616
picture.Height = 250;
1717
picture.Width = 250;

0 commit comments

Comments
 (0)