【问题标题】:CGPDFDocument and local dataCGPDF文档和本地数据
【发布时间】:2011-06-24 20:10:30
【问题描述】:

我在 Core Data db 中有一些 NSData(它是 pdf 数据),我想用 CGPDFDocument 打印我的 pdf。 我必须使用数据的 url,但我不知道如何使用本地数据(在我的核心数据数据库中)进行此操作。 有人有想法吗? :)

谢谢!

【问题讨论】:

    标签: cocoa url pdf core-data cgpdfdocument


    【解决方案1】:

    如果您使用的是 macOS,请使用 -[PDFDocument initWithData:]

    如果您使用的是 iOS,请使用 CGPDFDocumentCreateWithProviderCGDataProviderRef

    另外,这是CGPDFDocumentRef from NSData 的副本。

    【讨论】:

      猜你喜欢
      • 2017-09-13
      • 2013-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-23
      • 1970-01-01
      • 2012-01-31
      • 1970-01-01
      相关资源
      最近更新 更多