We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convertion of footnote referance to html having issue

when we use Aspose.word java to convert word doc to html. the footnote referance tag in html showing numbering of footnote in " Roman " digits instead of showing in digits which is presnt in processed word document. please suggesy any solution fot this. how to fix it ?

ex : This is example paragraph having included footnote referance^1 (here consider 1 as superscritpt digit linked referance to footnote).

O/p in html :
This is example paragraph having included footnote referance<a id="e13" href="#e388">i</a>

as shown above as we see " i " is showing wrapped by anchor tag as output. why ? it should be 1 only.

@vedpathakpranit Could you please attach your input and output documents here for our reference? We will check the issue and provide you more information.
I have tested with a simple document with footnote and footnote reference is exported like this to HTML:

<a name="_ftnref1"></a><a href="#_ftn1" style="text-decoration:none"><span style="font-size:7.33pt; vertical-align:super; color:#000000">[1]</span></a>

Sample.docx (15.8 KB)

i have uploaded sample document here is the output.

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
    <div id="e1">
        <p id="e2">This is sample paragraph included footnote reference<a id="e4" href="#e6">i</a></p>
    </div>
    <div id="e5">
        <p id="e6"> This is sample footnote included here.</p>
    </div>
</body>
</html>

Note : i use Aspose.word api version aspose-words (22.11) in Java code

@vedpathakpranit Thank you for additional information. Unfortunately, I cannot reproduce the problem on my side. Also, HHTML you have provided does not look like HTML produced by Aspose.Words. Here is HTML produced by the following simple code on my side:

Document doc = new Document("C:\\temp\\Sample.docx");
HtmlSaveOptions opt = new HtmlSaveOptions();
opt.setPrettyFormat(true);
doc.save("C:\\Temp\\out.html", opt);

output:

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta name="generator" content="Aspose.Words for Java 22.12.0" />
		<title>
		</title>
	</head>
	<body style="font-family:Calibri; font-size:12pt">
		<div>
			<p style="margin-top:0pt; margin-bottom:0pt">
				<span>This is sample paragraph included footnote reference</span><a name="_ftnref1"></a><a href="#_ftn1" style="text-decoration:none"><span style="font-size:8pt; vertical-align:super; color:#000000">[1]</span></a>
			</p>
		</div>
		<hr style="width:33%; height:1px; text-align:left; -aw-footnote-numberstyle:0; -aw-footnote-startnumber:1; -aw-footnote-type:0" />
		<div id="_ftn1" style="-aw-footnote-isauto:1">
			<p style="margin-top:0pt; margin-bottom:0pt; font-size:10pt">
				<a href="#_ftnref1" style="text-decoration:none"><span style="font-size:6.67pt; vertical-align:super; color:#000000">[1]</span></a><span> This is sample footnote included here.</span>
			</p>
		</div>
	</body>
</html>

Hi Alexey,

apologies to log this query found cause in code, it’s mapping of original text with Roman numerlas. i’m happy with your assistnace and your time. no issue from aspos side.

@vedpathakpranit It is perfect that you managed to resolve the issue on your side. Please feel free to ask in case of any issues. We are always glad to help you.