【问题标题】:How to print PDF file already opened in QLPreviewController using print button?如何使用打印按钮打印已经在 QLPreviewController 中打开的 PDF 文件?
【发布时间】:2013-09-12 11:50:27
【问题描述】:

我得到二进制数组,然后将其转换并保存在 Documents 文件夹中,然后显示在 QLPreviewController 中。我在QLPreviewController的工具栏上看到了右键。

我想立即打印预览中的内容。但是当我发生标签错误时

*** Assertion failure in -[UIDocumentInteractionController setURL:], /SourceCache/UIKit_Sim/UIKit-2380.17/UIDocumentInteractionController.m:960

另外请指导我打印该文档。我已经阅读了 UIPrintInteractionController。

【问题讨论】:

    标签: ios objective-c ios6.1 uidocumentinteraction qlpreviewcontroller


    【解决方案1】:

    为什么会出现此错误,因为您设置了错误的 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
    

    这个小错误会让你生气;)

    【讨论】:

      猜你喜欢
      • 2011-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-09
      • 2012-08-23
      • 2010-11-15
      相关资源
      最近更新 更多