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?
Asked
Active
Viewed 439 times
1 Answers
1
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?

Jonathan Grynspan
- 43,286
- 8
- 74
- 104
-
My ultimate goal is to get a rasterized PDF document that color matches exactly. When I draw it into a bitmap context the colors get darker. – Alex Zielenski May 23 '12 at 01:11
-
Mac or iOS? (iOS is missing some of the ColorSync machinery that the Mac has, so it can have some weird color rendering issues sometimes.) – Kurt Revis May 23 '12 at 02:34
-
1"Color matches exactly" means several things. If you just want to preserve absolute colour values, you should draw into a context whose colour space most closely matches the colour space of the PDF (or the images of interest within it, since the PDF might not have a single uniform colour space.) – Jonathan Grynspan May 23 '12 at 13:06