Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIWebview-无法打开受密码保护的.xlsx、.docx和.ppt_Ios_Uiwebview_Xlsx - Fatal编程技术网

Ios UIWebview-无法打开受密码保护的.xlsx、.docx和.ppt

Ios UIWebview-无法打开受密码保护的.xlsx、.docx和.ppt,ios,uiwebview,xlsx,Ios,Uiwebview,Xlsx,我已尝试打开(使用webview的loadData/loadRequest方法)我的web view控制器中受密码保护的文件。我可以打开密码保护的pdf和zip文件。它很好用。但是当我试图打开其他受密码保护的文件时,它显示了错误 (unable to read document). 如果我试图在Safari中打开该文件,也会出现同样的错误。 但是在iPad mail本机应用程序中,它工作正常 请引导我。问题是什么 每当我试图打开受密码保护的pdf/ppt文件时,它都会返回以下异常 **EXCE

我已尝试打开
(使用webview的loadData/loadRequest方法)
我的web view控制器中受密码保护的文件。我可以打开密码保护的pdf和zip文件。它很好用。但是当我试图打开其他受密码保护的文件时,它显示了错误

(unable to read document).
如果我试图在Safari中打开该文件,也会出现同样的错误。 但是在iPad mail本机应用程序中,它工作正常

请引导我。问题是什么

每当我试图打开受密码保护的pdf/ppt文件时,它都会返回以下异常

**EXCEPTION SFUZipEndOfCentralDirectoryError: Could not find the end of central directory record**

在解锁密码保护的zip或pdf之前,您无法打开它

CGPDFDocumentUnlockWithPassword(doc, pass).

我还没有尝试过,但我希望这会对您有所帮助。

通过UIWebView,我们无法打开除PDF以外的任何受密码保护的文件。如果要打开受密码保护的文件,请使用qlviewcontroller。它会很好地工作

谢谢Sanjay.Pdf和zip,没问题。它很好用。当我尝试打开.xlsx/.docx文件时,这些文件无法打开。qlviewcontroller工作正常,但是,似乎qlviewcontroller不支持开发人员自定义用户交互。例如,如果我想在触摸屏幕时弹出警报。我不知道如何监控用户触摸。