I'm missing something obvious here, but I can't remember what...
Can someone explain to me why when I log "url" it comes out as expected, and when I create "document" I get error code -15?
Thanks!
Can someone explain to me why when I log "url" it comes out as expected, and when I create "document" I get error code -15?
Code:
NSString *filePathString = [filePath stringValue];
CFStringRef URLString = (CFStringRef)CFBridgingRetain(filePathString);
CFStringRef URLStringEscaped = CFURLCreateStringByAddingPercentEscapes(NULL, URLString, NULL, NULL, kCFStringEncodingUTF8);
CFURLRef url = CFURLCreateWithString(kCFAllocatorDefault, URLStringEscaped, NULL);
NSLog(@"%@", url);
CGPDFDocumentRef document = CGPDFDocumentCreateWithURL(url);
Thanks!