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

Free Support Forum - aspose.com

Header Too Large Exception

I am converting word documents and I am receiving a 'Header Too Large' Exception. The Aspose.Words.dll version is 8.0.0.0. I am attaching a copy of the code, a copy of the error and several word documents. One thing I noticed is that the attached document CN1001818C01.doc converts okay. but the attached document CN1001794C01.doc does not. The headers are different in each document. We recently updated the dll file from 5.2.0.0 to 8.0.0.0. When we were using version 5.2.0.0, we did not have this problem.

I'm also attaching CN1001794C01.pdf which was produced using version 5.2.0.0.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. As I can see you use old method of PDF conversion. Currently the latest version of Aspose.Words supports two ways of PDF conversion: direct conversion (without using Aspose.Pdf) and legacy conversion (Aspose.Words+Aspose.Pdf). See the following link for more information:

https://blog.aspose.com/2008/12/12/converting-word-documents-to-pdf-with-aspose-words

You should note that we will exclude legacy (old) method of PDF conversion in one of our future versions. Also no new issues will be fixed in the legacy method. Please try using new SaveToPdf method. Here is the code:

Document doc = new Document("in.doc");

doc.SaveToPdf("out.pdf");

I cannot reproduce the problem on my side using the latest version of Aspose.Words (8.1.0) and direct method of PDF conversion. You can download this version from here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Please feel free to ask me in case of any issues.

Best regards,