Search code examples
objective-ccocoapdfcore-graphicsquartz-2d

CGPDFPageRef to CGImageRef/NSBitmapImageRep without drawing


I would like to losslessly convert a PDF to a raster image in Objective-C. To do this, there must be no drawing of the PDF into a context. Also, I need to be able to scale the PDF. Any ideas?


Solution

  • By converting a PDF into a raster representation, you are implicitly drawing it into a bitmapped graphics context. There's no way around that. Why do you think you need to avoid doing that? What's your ultimate goal here?