Building onto this question, I have tried to delve into CGPDF to get PDF size data without loading it into memory.
This part of iOS is very poorly documented, and searching the web only gives me some bad results about writing to pdfs.. Here is what i've tried, this doesn't result in anything else than a EXC_BAD_ACCESS on the noted line.
NSURL *imageFileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"a1" ofType:@"pdf"]];
CGPDFDocumentRef pdfSource = CGPDFDocumentCreateWithURL((__bridge CFURLRef)imageFileURL);
CGPDFDictionaryRef pdfProps = CGPDFDocumentGetInfo(pdfSource);
CGPDFStringRef cfValue;
CGPDFDictionaryGetString(pdfProps, kCGPDFMediaBox, &cfValue); //Crash, EXC_BAD_ACCESS
NSString *value = CFBridgingRelease(CGPDFStringCopyTextString(cfValue));
CGRect rect = CGRectFromString(value);
NSLog(@"#rekt: %@",NSStringFromCGRect(rect));
Where am I stepping wrong here?