- (void)footButtonAction
{
if ([self.downloadUrl isEqualToString:@""] || self.downloadUrl == nil || [self.downloadUrl isEqual:nil] || !self.downloadUrl) {
return;
}
NSURL * url = [[NSURL alloc] initWithString:self.downloadUrl];
CFURLRef ref = (__bridge CFURLRef)url;
CGPDFDocumentRef pdf = CGPDFDocumentCreateWithURL(ref);
CFRelease(ref);
CGImageRef imageRef = PDFPageToCGImage(1,pdf);
UIImage *amg = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);
//保存图片到相册
UIImageWriteToSavedPhotosAlbum(amg, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}
CGImageRef PDFPageToCGImage(size_t pageNum