Search code examples
iphoneuiwebviewms-worddoc

UIWebView and Word Document Changes Formatting


Ok, so I have an iPhone application that displays Word documents for certain terms and all. My problem is that the text seems to be "wrapped" or something else like that. This causes the words to not line up, which ultimately makes a lot of my Word documents contain incorrect information

I am inserting the .doc files into a UIWebView which is set for "scale pages to fit". Also, when I zoom in it still stays the same way. This is happening in both the simulator and the actual iPhone.

All help is appreciated!

Below are two screenshots. This first one is of the iPhone app:

Screenshot of iPhone

This second one is of the Word document and how the text should really look:

Screenshot of Word Document


Solution

  • Save the doc as an HTML and use the HTML in your app. That should resolve the issue.