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

Free Support Forum - aspose.com

Footnote Reference Id is getting changed after processed through Aspose

We are using Aspose licensed version 18.10.0.0 to generate PDF of .docx file and also to perform some cleanup like removing Field codes and Smart tags.

Conversion of file stream into Aspose object is resulting in some unwanted changes:

  1. Run style is getting changed from FootnoteReference to DefaultParagraphFont

  2. footnoteReference id is getting changed from 1 to 2

Which is resulting in content change and wrong footnote reference,

Below is document XML before processing through Aspose and after processing through Aspose.

Before processing through Aspose:

<w:r w:rsidRPr="00F11784">
	<w:rPr>
		<w:sz w:val="20"/>
		<w:szCs w:val="20"/>
	</w:rPr>
	<w:t>Roszaini Kadir</w:t>
</w:r>
<w:r w:rsidRPr="00F11784">
	<w:rPr>
		<w:rStyle w:val="FootnoteReference"/>
		<w:sz w:val="20"/>
		<w:szCs w:val="20"/>
	</w:rPr>
	<w:footnoteReference w:id="1" w:customMarkFollows="1"/>
	<w:sym w:char="F02A" w:font="Symbol"/>
</w:r>
<w:r w:rsidRPr="00457608" w:rsidR="001C5E1B">
	<w:rPr>
		<w:sz w:val="20"/>
		<w:szCs w:val="20"/>
	</w:rPr>
	<w:t xml:space="preserve">, </w:t>
</w:r>

After processed through Aspose:

<w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
	<w:rPr>
		<w:sz w:val="20"/>
		<w:szCs w:val="20"/>
	</w:rPr>
	<w:t>Roszaini Kadir</w:t>
</w:r>
<w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
	<w:rPr>
		<w:rStyle w:val="DefaultParagraphFont"/>
		<w:sz w:val="20"/><w:szCs w:val="20"/>
		<w:vertAlign w:val="superscript"/>
	</w:rPr>
	<w:footnoteReference w:id="2" w:customMarkFollows="1"/>
</w:r>
<w:r xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main">
	<w:rPr>
		<w:rStyle w:val="DefaultParagraphFont"/>
		<w:rFonts w:hAnsi="Symbol" w:ascii="Symbol"/>
		<w:sz w:val="20"/>
		<w:szCs w:val="20"/>
		<w:vertAlign w:val="superscript"/>
	</w:rPr>
	<w:sym w:char="F02A" w:font="Symbol"/>
</w:r>

@priyanka.gandhi,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output PDF file that shows the undesired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Hi,
Thanks for your reply,
Below is description for attached files:

  1. InputDocument.docm : Input word document
  2. Cleanupclass.txt : Contains steps which our module is doing, it includes creation of Aspose document object using document path. it is resulting in changes in document xml which is mentioned in question asked before.
  3. WordToPdfConverter.cs : After cleanup class we convert word document into PDF. WordToPdfConverter.cs contains steps for the same, this conversion is resulting into content change in PDF.

@priyanka.gandhi,

Thanks for sharing the detail. We have converted the shared document to PDF using the latest version of Aspose.Words for .NET 19.1 and have not found the shared issue. So, please use Aspose.Words for .NET 19.1. We have attached the output PDF with this post for your kind reference. 19.1.pdf (187.8 KB)