As @ jshin47 - следующий фрагмент поможет вам:
Это преобразует pdf с именем test.pdf, находящийся в каталоге локальных документов, в png с именем test.png.Я использовал размеры А4 для PDF, но если вы не в Великобритании / Европе, вам могут потребоваться американские размеры букв.
NSString* localDocuments = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) objectAtIndex:0];
NSString* pdfPath = [localDocuments stringByAppendingPathComponent:@"test.pdf"];
// create a sample PDF (just for illustration)
UIGraphicsBeginPDFContextToFile(pdfPath, CGRectZero, nil);
UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, 612, 792), nil);
[@"Test string" drawInRect:CGRectMake(50, 50, 300, 200) withFont: [UIFont systemFontOfSize: 48.0]];
UIGraphicsEndPDFContext();
NSURL* url = [NSURL fileURLWithPath: pdfPath];
CGPDFDocumentRef document = CGPDFDocumentCreateWithURL ((CFURLRef) url);
UIGraphicsBeginImageContext(CGSizeMake(596,842));
CGContextRef currentContext = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(currentContext, 0, 842);
CGContextScaleCTM(currentContext, 1.0, -1.0); // make sure the page is the right way up
CGPDFPageRef page = CGPDFDocumentGetPage (document, 1); // first page of PDF is page 1 (not zero)
CGContextDrawPDFPage (currentContext, page); // draws the page in the graphics context
UIImage* image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSString* imagePath = [localDocuments stringByAppendingPathComponent: @"test.png"];
[UIImagePNGRepresentation(image) writeToFile: imagePath atomically:YES];
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil); // do error checking in production code