Skip to content

Commit 9d34387

Browse files
author
Konduru Keerthi Konduru Ravichandra Raju
committed
HTML conversions
1 parent c5b38f3 commit 9d34387

File tree

3 files changed

+3
-3
lines changed
  • HTML-conversions
    • Customize-image-path-in-Word-to-html/.NET/Customize-image-path-in-Word-to-html
    • Extract-images-when-export-to-HTML/.NET-Framework/Extract-images-when-export-to-HTML
    • Save-image-in-folder-in-Word-to-HTML/.NET/Save-image-in-folder-in-Word-to-HTML

3 files changed

+3
-3
lines changed

HTML-conversions/Customize-image-path-in-Word-to-html/.NET/Customize-image-path-in-Word-to-html/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static void Main(string[] args)
2727
static void SaveImage(object sender, ImageNodeVisitedEventArgs args)
2828
{
2929
// Specify the folder path.
30-
string folderPath = @"D:\Temp";
30+
string folderPath = Path.GetFullPath(@"../../../");
3131
// Specify the image filename.
3232
string imageFilename = "Image.png";
3333
// Check if the folder exists, and create it if it doesn't.

HTML-conversions/Extract-images-when-export-to-HTML/.NET-Framework/Extract-images-when-export-to-HTML/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ static void Main(string[] args)
1111
using (WordDocument document = new WordDocument(Path.GetFullPath(@"../../Template.docx")))
1212
{
1313
//Sets the location to extract images.
14-
document.SaveOptions.HtmlExportImagesFolder = @"D:/Images/";
14+
document.SaveOptions.HtmlExportImagesFolder = Path.GetFullPath(@"../../Images");
1515
//Saves the document as html file.
1616
HTMLExport export = new HTMLExport();
1717
export.SaveAsXhtml(document, Path.GetFullPath(@"../../Result.html"));

HTML-conversions/Save-image-in-folder-in-Word-to-HTML/.NET/Save-image-in-folder-in-Word-to-HTML/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static void Main(string[] args)
3030
static void SaveImage(object sender, ImageNodeVisitedEventArgs args)
3131
{
3232
//Customize the image path and save the image in an external folder.
33-
string imagepath = @"D:\Temp\Image_" + imageCount + ".png";
33+
string imagepath = Path.GetFullPath(@"../../../Image_") + imageCount + ".png";
3434
//Save the image stream as a file.
3535
using (FileStream fileStreamOutput = File.Create(imagepath))
3636
args.ImageStream.CopyTo(fileStreamOutput);

0 commit comments

Comments
 (0)