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

Free Support Forum - aspose.com

Conversion from Word to PDF has some problems with header/footer

Having some trouble when trying to convert a word document to PDF. Specifically the header and footer is duplicating and re-positioning some elements on the page.


In the attachments you can see how the header and footer on page 2 has not saved correctly in the PDF file.

The code I’m using…

Dim bData As Byte()
Dim br As BinaryReader = New BinaryReader(System.IO.File.OpenRead(f))
bData = br.ReadBytes(br.BaseStream.Length)
Dim ms As MemoryStream = New MemoryStream(bData, 0, bData.Length)
ms.Write(bData, 0, bData.Length)
ms.Position = 0
Dim MS2 As New System.IO.MemoryStream
Dim MyDoc = New Aspose.Words.Document(ms)
MyDoc.Save(MS2, Aspose.Words.SaveFormat.Pdf)
Hi Pamela,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 16.5.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-13788. Your thread has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Do you have any ETA on when we can expect to see a resolution to this issue? It’s having a large impact on our conversion process.

Hi Pamela,


Thanks for your inquiry. This issue is partially resolved in 16.6.0 version of Aspose.Words. The issue with the footer is no longer reproducible; however, the issue with the header is still unresolved. We have asked the ETA of WORDSNET-13788 from our product team and will update you as soon as any estimates are available. We apologize for your inconvenience.

Best regards,

We are still awaiting feedback on this issue. We were expecting to have seen some type of response. Do we still have no ETA on getting this issue resolved.

Hi Pamela,


Our product team has completed the analysis of WORDSNET-13788 and the root cause has been identified. However, because of complexity, the implementation of the fix of this issue has been postponed.

We have further analyzed the issue in the header. It is not that easy to fix because currently line reflow is confined within line width value which depends on the right indent of the paragraph. However, this right aligned tab effectively overrides that behavior and allows spans to appear outside of the line width.

In order to fix this, we need to re-design line reflow logic. I am afraid, there is no ETA available at the moment and we won’t be able to fix it soon.

We apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-13788) have been fixed in this Aspose.Words for .NET 19.5 update and this Aspose.Words for Java 19.5 update.