Hi,
We are using Aspose Total Lic version 10.0.0.0 to generate word document
In this process we are taking Aspose HTML of the input word document using the following code:
string htmlText = string.Empty;
string lStrImageFolder = string.Empty;
lStrImageFolder = FolderPath + "/" + ConfigurationManager.AppSettings["HTMLFileFolderName"].ToString();
string tempDir = Path.Combine(Server.MapPath(lStrImageFolder));
if (!Directory.Exists(tempDir))
Directory.CreateDirectory(tempDir);
Aspose.Words.Saving.HtmlSaveOptions saveOptions = new Aspose.Words.Saving.HtmlSaveOptions();
saveOptions.ImagesFolder = tempDir;
saveOptions.CssStyleSheetType = Aspose.Words.Saving.CssStyleSheetType.Embedded;
saveOptions.SaveFormat=SaveFormat.Html;
saveOptions.ImagesFolderAlias = ConfigurationManager.AppSettings["HTMLFileFolderName"].ToString();
MemoryStream htmlStream = new MemoryStream();
doc.Save(htmlStream, saveOptions);
htmlText = Encoding.UTF8.GetString(htmlStream.GetBuffer());
htmlStream.Close();
In the generated HTML we are facing problem because the data is splitted in multiple span tags.
For example:
Input Text:
switchport trunk allowed vlan <<var_global_mgmt_vlan_id>>,<<var_global_nfs_vlan_id>>
The HTML generated for this input is:
<p class="ConsoleBlockSmall">
<span>switchport trunk allowed vlan </span>
<span><<var_global_mgmt_vlan_id>></span>
<span>,</span>
<span><<</span>
<span>var_</span>
<span>global_nfs_vlan_id>></span>
</p>
Means in the output the data is splitting in multiple span tags:
<span><<</span>
<span>var_</span>
<span>global_nfs_vlan_id>></span>
so is there any way we can get the above data in single span tag like:
<span><<var_global_nfs_vlan_id>></span>
PFA file for reference
Please provide the solution asap
Thanks,
Samanvay