How to draw into PDF on iOS? <p>I am trying to find a way to allow the user to annotate (i.e. free form drawing) an existing PDF file in iOS, but the only approach that I have found seems extraordinarily cumbersome.</p> <p>The solution is in Monotouch, but I can translate from Objective-C if needed. This will also mean that many of the method and property names may not be completely familiar to non-Monotouch developers, but I am just looking for an approach.</p> <p>I currently have code that allows users to annotate images (jpg, png) using the TouchesMoved and TouchesBegan events on a UIView. This works well and accomplishes what I need.</p> <p>However, when working with an existing PDF file, it seems that the majority of the CGPDF functionality is centered around creating new files rather than editing existing ones.</p> <p>The only approach that I have been able to come up with is the following:</p> <ol> <li><p>When the UIView is opened, create a temporary file and set the PDF context to that file (UIGraphics.BeginPDFContext(filename)).</p></li> <li><p>Create a new CGPDFDocument from the original file and then draw each page from the original PDF into the current context, which will be the new temporary file.</p></li> <li><p>Destroy the original PDF document created in step 2.</p></li> <li><p>Show the user the first page and then let them draw on it, with the drawing commands being sent to the new file's context. There will also be methods to allow the user to change pages.</p></li> <li><p>When the user is done, close the PDF context, which will save all of the annotations to the new PDF file.</p></li> </ol> <p>This seems like it has the potential to be an enormous memory and performance hog, so I am wondering if there is any other way to approach this?</p>