开发者

CGPDFDocument and local data

开发者 https://www.devze.com 2023-02-09 13:21 出处:网络
I have some NSData in Core Data db (it\'s pdf data) and I would like to print my pdf with CGPDFDocument.

I have some NSData in Core Data db (it's pdf data) and I would like to print my pdf with CGPDFDocument. I have to use url of the开发者_如何学C data but I don't know how to make this with a local data (in my Core Data db). Someone has an idea ? :)

Thanks !


If you are on macOS, use -[PDFDocument initWithData:].

If you are on iOS, use CGPDFDocumentCreateWithProvider with a CGDataProviderRef.

Also, this is a duplicate of CGPDFDocumentRef from NSData.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号