Why doc and docx losing style information in iOS?

2019-07-26 07:51发布

问题:

I wanted to open a docx, doc file in iOS.

I tried two ways:

1.Web view

2.QLPreviewController

In both the ways I am losing the style information associated with the document.

WHy this happens? Is in any way possible to retain the style information.

Is there any way we can retain this information?

The Style could be:

  1. A table in document - displayed with doc format but not with docx format
  2. Particular text in the document alone can be hightlighted with a color

回答1:

iOS has support for MS Office documents through a UIWebView, as you know.

It means the document is in some way «converted» to an HTML representation, and then displayed.

UIWebView is not MS Word.
Don't expect it to behave like it, and support all of its features.