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

Free Support Forum - aspose.com

Malformed pdf document

Hello, good Diasestamos using Aspose.Words version 15.4. We have an origianl .odt document with margins in the header. To convert that document to .pdf with Aspose.Words margins will get bigger and leave the bad format document.

The code we use is as follows

doc is the array of bytes with the original document

msIn = New MemoryStream(doc)

msOut = New MemoryStream()


DocAspose = New Aspose.Words.Document(msIn)

DocAspose.Save(msOut, Aspose.Words.SaveFormat.Pdf)

Hi Francesc,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 16.4.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-13639. Your request 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,


Regarding WORDSNET-13639, our product team has completed the work on your issue and has come to a conclusion that they won’t be able to implement the fix to your issue. Your issue (WORDSNET-13639) will be closed with ‘Won’t Fix’ resolution.

This issue occurs because in Open Office it is possible to set the header height, and it will truncate header content for this height.

<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”><style:header-footer-properties svg:height=“4.339cm” fo:margin-left=“0cm” fo:margin-right=“0cm” fo:margin-bottom=“0cm” style:dynamic-spacing=“false”/> 
<span style=“font-family: Consolas, “Bitstream Vera Sans Mono”, “Courier New”, Courier, monospace !important;”></style:header-style> 

MS Word ignores this option, and pdf document fully equals to what Aspose.Words does.

So, we can’t implement this behavior due to it being specific for OpenOffice and not compatible with MS formats.

We apologize for any inconvenience.

Best regards,