Viewport height is invalid

I am getting the exception below when converting a docx document to pdf using version 9.4.0.0. My code looks like this:

Stream fileOut = new MemoryStream();
Aspose.Words.Saving.PdfSaveOptions pdfOptions = new Aspose.Words.Saving.PdfSaveOptions();
pdfOptions.HeadingsOutlineLevels = 1;
pdfOptions.ExpandedOutlineLevels = 1;
pdfOptions.BookmarksOutlineLevel = 1; //max allowed value is 9
pdfOptions.JpegQuality = JpegQuality;
pdfOptions.TextCompression = Aspose.Words.Saving.PdfTextCompression.Flate;
doc.Save(fileOut, pdfOptions);
return fileOut;

Here is the execption:

System.InvalidOperationException: Viewport height is invalid.
at xa7850104c8d8c135.x620a827d91bf9cfe.x9b3f290a765150b6()
at xa7850104c8d8c135.x620a827d91bf9cfe.xdfb72004658a4a71()
at xa7850104c8d8c135.x620a827d91bf9cfe.get_xe769b78104041bb6()
at xa7850104c8d8c135.xdaec868fc92da412.xf1c59e95a2a1c03b(RectangleF x4522b57e50ea54a2, RectangleF x334178e22916b6db, Byte[] x43e181e083db6cdf)
at xa7850104c8d8c135.x36e85e2927175782.x1db6366f4f7b6428()
at xa7850104c8d8c135.x36e85e2927175782.xb820878a71fbe650(xec95ecd2fe18d5f2 xc1674de501b364d0)
at xa7850104c8d8c135.x36e85e2927175782.DoPlay()
at xa7850104c8d8c135.x4cb7537b071ca71a.x0613827d1b6c81c9(x3fa09e8d7b952fbc x7314c991efe1c392, x9bef3b1e893f7f2e xb5001325846e2ee9, xeaf0b03643b7ac93 x0f7b23d1c393aed9)
at xa7850104c8d8c135.xdaec868fc92da412.x5b81632e5b71b64c(x3fa09e8d7b952fbc x7314c991efe1c392, SizeF x0ceec69a97f73617, xeaf0b03643b7ac93 x0f7b23d1c393aed9)
at xa7850104c8d8c135.xc53fbeb71f313ea9.x5b81632e5b71b64c(x72c34b8dbaec3734 xaf3288ddace2264d, xeaf0b03643b7ac93 x0f7b23d1c393aed9)
at x1c8faa688b1f0b0c.x72c34b8dbaec3734.x9214b18190604b0d(xf51865b83a7a0b3b x672ff13faf031f3d, xc53fbeb71f313ea9 x5a7a657dd8463d3b)
at x4f4df92b75ba3b67.x92faf2a956f0f5a7.VisitImage(x72c34b8dbaec3734 image)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xc67adcdbca121a26.Accept(xf51865b83a7a0b3b visitor)
at x6a671772ec29137f.xcd769e39c0788209.x8cac5adfe79bc025(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
at 

Does the stack trace give any clues about what aspect of the word document could be causing this error? The word document was generated by MS Word. I need help figuring out what to look for in the word doc so I can modify it to avoid this error.
thanks,
Ken

Hello

Thanks for your request. Could you please attach the document you are getting issues with? I will check the problem on my side and provide you more information.
Best regards,

Unfortunately I cannot post the document as it would take too long to remove all proprietary information. If I can figure out what in the document is causing the problem, I should be able to put together a simpler test case which I can post. I am hoping that you can un-obfuscate the stack trace to get some clues as to what part of the word document is causing the problem.

Hello

Thanks for your request. Unfortunately, it is difficult to say what the problem is without the document. I need this document to reproduce the problem on my side.
It is safe to attach files in the forum. If you attach your document here, only you and Aspose staff members can download it. Also you can send the file to my e-mail as described here
https://forum.aspose.com/t/aspose-words-faq/2711
Best regards,

I have isolated the problem down to one page. The attached document has this page.

Hi Ken,
Thanks for attaching your template here.
I managed to reproduce the issue on my side. It has been logged and you will be informed when a fix is ready. The issue is caused by a rectangle auto-shape left behind the image which is resized to a very small size.
I have refactored the document to remove this and to make floating content render to PDF correctly. I have sent this document to your inbox.
Thanks,

The issues you have found earlier (filed as 22864) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.