Removing watermark in word with OpenXml & C# corrupts document
问题 I have tried following code block to delete the watermark from the document Code 1: private static void DeleteCustomWatermark(WordprocessingDocument package, string watermarkId) { MainDocumentPart maindoc = package.MainDocumentPart; if(maindoc!=null) { var headers = maindoc.GetPartsOfType<HeaderPart>(); if(headers!=null) { var head = headers.First(); //we are sure that this header part contains the Watermark with id=watermarkId var watermark = head.GetPartById(watermarkId); if(watermark!=null