unir smallpdf programas pasar paginas mas love jpg imagen convertir como iphone objective-c ios uiimage

iphone - smallpdf - Cómo convertir un archivo pdf a imagen a través de la codificación en el objetivo c



pasar a pdf (1)

CGPDFDocumentRef PDFfile; CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("iPhone Sample apps.pdf"), NULL, NULL); PDFfile = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CFRelease(pdfURL); CGPDFPageRef page = CGPDFDocumentGetPage(PDFfile,currentpage); context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0); CGContextFillRect(context,self.bounds); CGContextTranslateCTM(context, -1.0, [self bounds].size.height); CGContextScaleCTM(context, 1.0, -1.0); CGContextConcatCTM(context, CGPDFPageGetDrawingTransform(page, kCGPDFArtBox, [self bounds], 0, true)); CGContextDrawPDFPage(context, page); CGContextRestoreGState(context); CGImageRef imgref; imgref=CGBitmapContextCreateImage(context); image= [[UIImage alloc]initWithCGImage:imgref ];

Cómo convertir un archivo pdf a imagen a través de la codificación en el objetivo c

Tengo un archivo pdf, pero quiero guardarlo en el álbum de fotos de iPhone, así que es por eso que quiero convertirlo. Si hay otra forma, por favor sugiérame.

Gracias por adelantado.