iOS: writeToFile

Hi guys

Any assistance with the following would be greatly appreciated, as I am very new to obj-c and iPad development.

I open a PDF using the prescribed PDFDoc* reference in obj-c, which works fine. I got my toolbar, from 6.2.1 initialized and life in PDFTron land is good.

However, I need to save the current open document, read from the iPad, back to the file on disc. I assed saveToFile would work here, but the document is obviously locked because it's currently in use, right?

I tried to search for examples where a document is read into memory first, but there is so little examples and help out there.

Is there a way to save the current document back to file, including the annotations? I really don't
want to store them seperately either?

Any help would be greatly appreciated.

Thanks.

Eric

[_pdfDoc SaveToFile:{FilePathString} flags:e_ptincremental];