views:

27

answers:

1

I have working code that will draw a page of a PDF. Now I would like to exclude a bitmapped image that appears on that page (but continue to draw the formatted text).

I understand that I can use a CGPDFScanner to scan the contents of the PDF. Is there a way to write those contents into a new PDF, but skip any bitmapped images? Or is there some other way?

PDF support on the iPhone seems quite limited. Unfortunately, I need to do this processing on the device as the app is downloading the PDF from some other source and I cannot ship a modified version of the PDF with the app.

A: 

Do you know exactly where on the page this image appears? If so you could blank it out with a simple opaque UIView for display. Or if you need to do something with the display (like save, redisplay, forward) you could then grab the image from the CGContext and store it as png etc.

Adam Eberbach
I do know where the image appears, but it is underneath some of the formatted text which I want to keep :(.
Hilton Campbell