pdfdoc.tryLock()

when trying to save the document, I do a tryLock()… but it always returns me false. What can be the reason?

If tryLock failed, it sounds like some thread already holds a read lock on the document. You can find further advice for locking at:

https://groups.google.com/d/msg/pdfnet-sdk/pDZsqrjCEdg/HYvfg_R4LUIJ

Yeah I read that… and now I am first doing pdfViewControl.docLock(true);
and then trying lock … is this good?

pdfViewControl.docLock(true) is canceling any threads the viewer launched (such as rendering and find text), and then locks it for read/write.

If you call doc.Lock on the same thread, then that would be fine, though you don’t need to (on the same thread).

Any other threads would be locked out though.