|
|
#1 |
|
CGPDFDocumentRef issue
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? 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);
|
|
|
|
0
|
|
|
#2 |
|
Got it
I figured it out:
I should have been using "CFURLCreateWithFileSystemPath" not "CFURLCreateWithString" |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 12:47 AM.







Linear Mode
