I am working on a requirement event receiver generates page content into Microsoft Word and PDF using a third party DLL. Once the generation is completed I need to upload it to document library.
This happens on ItemUpdated
and code works fine when the doc or pdf files are not in the library but when they are created and I have to update them it throws an error.
ex = {"The file \"http://www-mylab.com/en/home/Documents/James-bond_1033.pdf\" is not checked out. You must first check out this document before making changes."}
web.Files.Add(wordFileUrl, wordStream, true);