Free Support Forum - aspose.com

UpdatePageLayout & Convert Word Document to DOC Format & Manage Unexpected Subdocument Type C# .NET

Hello,

I’m testing Aspose.Words and I have run into an exception. I’ve attached the problem document.

Here is the code to reproduce the issue:

Document doc = new Document(sourcefile);
doc.UpdatePageLayout();
doc.Save(savedir);

The exception only occurs if UpdatePageLayout() is called before Save().

There appears to be an association of some sort between the frame in the document and the textbox, if the frame is moved the textbox moves with it. The textbox will move independently. If either the frame or textbox is deleted the exception does not occur.

Any help is appreciated.

Hello

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

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

Is there an estimated time frame that this issue will be resolved?

Hello

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

Thanks for your inquiry. Currently it is difficult to provide you a reliable estimate regarding this issue. Please expect a reply before the next hotfix (within 4-5 weeks). We might just fix the problem by then or provide you more information.

Best regards,

Hello

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

Thanks for your inquiry. Unfortunately, the issue is still unresolved and currently I cannot provide you any reliable estimate regarding this issue. You will be notified as soon as it is fixed.

Best regards,

Hello


Is there any update on the status of this issue? I have tested Apose.Words 9.3 and the problem still occurs.

Hi Alec,

Thanks for your inquiry.

The issue is currently being looked at, we will inform you of any developments. In the mean time you can avoid this exception by avoiding using frames in your document, more specifically using textboxes within frames. You could also avoid this issue by removing your call to UpdatePageLayout. Is there a specific reason as to why you need to call this method with this document?

Sorry for any inconvenience.

Thanks,

Looking closer at the documentation it appears UpdatePageLayout() is called during Save() so it sounds like a separate call is indeed not necessary. I will have to run further tests on my Word test documents to confirm this.


Thank you

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

Thanks for your request. UpdatePageLayout is calling when the document layout is built e.g. when you save to PDF or print. So to update page numbers in TOC, for example, you should call Document.UpdatePageLayout or just save document in PDF or XPS (just in this case UpdatePageLayout will be calling automatically).

Best regards,

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


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

I can still reproduce thig but with 9.6 version (Save() method). The doc example in attachments

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

Thanks for your request. It seems this problem was partially resolved in the latest version of Aspose.Words. But there is still some problem with this document. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

Best regards,

Hi,
are there any good news about this issue?

Thanks

Hello

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

Thanks for your inquiry. Unfortunately, this issue is still unresolved. You will be notified as soon as it is fixed. Sorry for inconvenience.

Best regards,

Hi,

is there any progress about this issue?
Thank you

Hello,

Thank you for your request.
I can not reproduce your problem on our latest product. Please try to download version 9.7.0.0 here. Most likely the problem is solved in some other fix.

Hi,

I’ve installed the latest release (9.7) and still can reproduce that bug (Unexpected subdocument type. on Document.Save method)
Please check the documents in attachment

Thank you for additional information.
I checked your source document. The problem is not reproduced on it.
But I managed to reproduce the problem on documents you have given. I have attached your documents to the corresponding request in our defect database. As well as I’ll include your request in my monthly report, it will increase the priority of the bug. Sorry for the inconvenience.

Hi there!

Are there any good news about this issues?
I have some another document that fails with such error (see attachments)
May be you can provide a bugfix more earlier?
Thank you

Hi

Thank you for additional information. I attached your document to the issue. We will let you know once the problem is resolved. At the moment the issue is assigned for analysis. once we have more information regarding it we will let you know.

Best regards,