[英]How to print PDF file already opened in QLPreviewController using print button?
我得到二進制數組,然后將其轉換並保存在Documents文件夾中,然后在QLPreviewController中顯示。 我已經在QLPreviewController工具欄上看到了右鍵。
我想立即打印預覽中的內容。 但是當我出現制表錯誤時
*** Assertion failure in -[UIDocumentInteractionController setURL:], /SourceCache/UIKit_Sim/UIKit-2380.17/UIDocumentInteractionController.m:960
另外,請指導我有關打印該文檔的信息。 我已經閱讀了有關UIPrintInteractionController的信息。
為什么會發生此錯誤,因為您將URL設置錯誤。 您正在像這樣設置網址;
/Users/akrama2/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/59356D13-C021-431F-A5D2-B8CD16E2B301/Documents/Application_Report.pdf
其中UIDocumentationController的任務URL為:
file://localhost/Users/akrama2/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/59356D13-C021-431F-A5D2-B8CD16E2B301/Documents/Application_Report.pdf
這個小錯誤會讓你生氣;)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.