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

Free Support Forum - aspose.com

Word document converted to XAML package should not display text formatted as hidden

I have attached a Visual Studio solution that converts a Word document to a XAML package and displays the results. The Word document contains hidden text which is, but should not be visible in the converted document.

Hi Oliver,

Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-8579. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,
Hi Oliver,

Thank you for your interest in Aspose.Words. Text in flow Xaml is exported using Run elements. Unfortunately, these elements do not have a property to hide them. So the only option is completely remove hidden content from the output XAML. Is this acceptable for you? We can add an option into XamlFlowSaveOption, which will control whether hidden content should be removed or not.
Or, you can simply remove hidden content before exporting document to XAML.

Best regards,

Hi,

Would it be possible to make the text hidden by setting a foreground colour with an alpha value of 255 (transparent)?

Incidentally, this new feature—save as XamlPackage—is excellent. It means we can give a lovely preview of a Word document in WPF that reflows just like the real thing. We've tried all kinds of ways to get a preview of a Word document, and this is the best. I think this would be useful to a lot of people: it would be worth promoting more heavily, maybe with an example of how to use it.

We have been extremely impressed with your support. (I don't think I've ever had a company come back to me and ask how I'd like a feature to be implemented before!)

Thanks,
Olly

Hi Oliver,


Thank you for you suggestion. But transparent text will affect layout of the document. For example, if we have sentence “Hello World!!!” (underlined text is hidden), then if we make hidden text transparent we will get something like this: “Hello !!!”. So I think it would be better simply remove hidden content.

Best regards,

Yes, you're one step ahead of me there. The option to remove hidden text would be best.

Thanks.

Hi Oliver,

We have a good news for you that is WORDSNET-8579 has now been resolved and it's fix will be included in the next release of Aspose.Words (13.7.0) which is planned to be released by the end of July 2013. We will inform you via this thread as soon as the new release of Aspose.Words is published.

Best regards,

The issues you have found earlier (filed as WORDSNET-8579) have been fixed in this .NET update and this Java update.


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

Thank you very much for the fix.

Is the new behavior controlled by an option, as discussed in the thread above? I can't find any up to date documentation on the XamlFlowSaveOptions object.

Also, it seems that performing the following steps still gives incorrect results.

  1. Turn on Track Changes in Word.
  2. Add some text.
  3. Format the text as hidden.

The resulting text is included in the XAML package; it should be omitted because it's hidden, and the fact that it's change tracked should make no difference. Actually, this may be a problem with the code that handles change tracking: it seems that changes to formatting that haven't yet been accepted don't get carried across, though the changes to the text itself are visible.

Thanks,
Olly

Hi


Thank you for your request. No there is no additional options in XamlSaveOptions. Hidden text is simply omitted upon exporting to XAML. This behavior was chosen because there is no attribute to hide run of text in XAML.
Regarding revisions, when you convert document as is in the resulting document you see “before changes” content. If you would like to see “after changes”, you should simply accept all revisions before converting document. Simply call doc.AcceptAllRevisions before saving document as XAML.

Best regards.