I get my PDF from SQLite DB into a NSData variable. Now what are my options to create CGPDFDocumentRef from this NSData?
Or what are my options anyway to create this CGPDFDocumentRef, have the data in SQLite?
I get my PDF from SQLite DB into a NSData variable. Now what are my options to create CGPDFDocumentRef from this NSData?
Or what are my options anyway to create this CGPDFDocumentRef, have the data in SQLite?
You can create a PDF document using this function:
To create the provider you can use this function:
and consider that
NSData
andCFDataRef
are toll-free bridged so you can use them interchangeably.So summarizing try this:
Don't forget to
CFRelease
all unused data.