[英]How to print PDF file already opened in QLPreviewController using print button?
I get binary array then convert it and save in Documents folder and then showed in QLPreviewController. 我得到二进制数组,然后将其转换并保存在Documents文件夹中,然后在QLPreviewController中显示。 I have seen the right button on the tool bar of QLPreviewController.
我已经在QLPreviewController工具栏上看到了右键。
I want to print that is in the preview right now. 我想立即打印预览中的内容。 But when i tab error occurs
但是当我出现制表错误时
*** Assertion failure in -[UIDocumentInteractionController setURL:], /SourceCache/UIKit_Sim/UIKit-2380.17/UIDocumentInteractionController.m:960
Also please guide me about printing that document. 另外,请指导我有关打印该文档的信息。 I have read about UIPrintInteractionController.
我已经阅读了有关UIPrintInteractionController的信息。
Why this Error occurs because you have set the URL wrong. 为什么会发生此错误,因为您将URL设置错误。 You are setting url like that;
您正在像这样设置网址;
/Users/akrama2/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/59356D13-C021-431F-A5D2-B8CD16E2B301/Documents/Application_Report.pdf
Where as UIDocumentationController task URL as: 其中UIDocumentationController的任务URL为:
file://localhost/Users/akrama2/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/59356D13-C021-431F-A5D2-B8CD16E2B301/Documents/Application_Report.pdf
This minor mistake will made you mad ;) 这个小错误会让你生气;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.