title: Failed to display UIWebView to display docx/xlsx file with SFUZipEndOfCentralDirectoryError error with custom URL
body: <p>We are writing some program to display documents on iOS. I think that there are a lot of confusion on the web about what type of documents which iOS UIWebView could display.  Generally people refer to <a href="http://developer.apple.com/library/ios/#qa/qa1630/_index.html#//apple_ref/doc/uid/DTS40008749" rel="nofollow noreferrer">Technical Q&amp;A QA1630 Using UIWebView to display select document types</a> to see that all the MS office 07+ files (such as docx, xlsx, pptx) could not be displayed, however actually that is not what we see from testing. Actually we are able to display docx/xlsx/pptx document at UIWebView either loading from a remote URL, local file or in memory (loadData, here the baseURL can not be nil on simulator, see <a href="https://stackoverflow.com/questions/2764709/iphone-uiwebview-loaddata-does-not-work-with-certain-types-excel-msword-ppt">this link</a>). Of course We are testing on latest version of iOS on iPhone simulator, it might be that the support was not at older iOS. At this point, We don't know that yet. If you know, please let me know.</p>
  
  <p>However right now, We have one issue to display document at UIWebView by using custom URL for security reason. I did the custom URL by following the code here: <a href="http://aptogo.co.uk/2010/07/protecting-resources/" rel="nofollow noreferrer">protecting iOS resource</a>. We could display xls, doc, ppt, pdf file, but not docx/xlsx/pptx, We got some error like this:</p>
  
  <pre><code>EXCEPTION SFUZipEndOfCentralDirectoryError: Could not find the end of central directory record
  </code></pre>
  
  <p>We tried to debug and could not figure what's to do here. Do you see similar error here? Could anyone shed some lights on this? Thanks very much.</p>