pdfdoc.tryLock()

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.