Hi GemBox Team,
I have a question regarding the paginator.
My application loads a document from a file and then uses “GetPaginator()” to receive the pages. If this operation takes longer than a configured amount of seconds, the thread is aborted. When I implement a specific document, I receive the following exception:
{
"Type": "System.InvalidCastException",
"TargetSite": "System.Object ChkCast_Helper(Void*, System.Object)",
"Message": "Unable to cast object of type '\\u0002\\u001a\\u0002' to type '\\u0002\\u0002\\u0002'.",
"Data": {},
"Source": "System.Private.CoreLib",
"HResult": -2147467262,
"StackTrace": "
at \\b\\u0018\\u000f.\\u000e\\u0016(\\u000f\\u0019\\u0002 \\u000f, \\b\\u0016\\u0002& \\b, Int32& \\u0006)\\n
at \\b\\u0018\\u000f.\\u0006\\u0016(\\u000f\\u0019\\u0002 \\u000f)\\n
at \\u0002\\u000f\\u0019.\\u000e\\u0002()\\n
at \\u0005\\u0010\\u0019.\\u0005\\u0019()\\n
at GemBox.Document.DocumentModel.\\b\\u001b(PaginatorOptions \\u000f, \\u000f\\u0018\\u0015\\u0018 \\b, \\u0005\\u0005\\u0010\\u0018 \\u0006, Boolean \\u0002)\\n
at GemBox.Document.DocumentModel.GetPaginator()\\n
at ..."
}
Is this due to potentially cancelling the GetPaginator() method? Or could this be a problem with the document?
Note: when I load the document in an example project without a cancellable thread, the paginator can be used as expected. Therefore the problem is not really easy to reproduce.
Kind regards,
Sarah