I've encountered following exception, when loading pdfDocument into MergeDocument class:
System.InvalidCastException: Unable to cast object of type 'zz93.nw' to type 'zz93.oa'.
at ceTe.DynamicPDF.ViewerPreferences.a(n0 A_0, np A_1)
at zz93.n2.d(MergeDocument A_0, np A_1)\r\n at zz93.nt.a(Int32 A_0, Int32 A_1)
at ceTe.DynamicPDF.Merger.MergeDocument..ctor(PdfDocument pdfDocument, MergeOptions options)
at InDoc.Document.Watermark.PdfWatermarker.AddWatermark(Stream documentStream, Options options)
The code that throws exception is:
var pdf = new PdfDocument(documentStream);
var mergeDocument = new MergeDocument(pdf);