Создание XPSDocument с путем xps завершается неудачно в случае больших файлов XPS ~ 40 МБ - PullRequest
0 голосов
/ 16 марта 2019

мы пытаемся создать xpsdocument для доступного xpspath следующим образом.

XpsDocument xpsDoc = new XpsDocument(XPSFullPath, FileAccess.Read);

исключение происходит в нижней строке

mDocPaginator = mXpsDoc.GetFixedDocumentSequence().DocumentPaginator;

Подробности исключения приведены ниже. (у меня проблема с загрузкой изображения, поэтому я даю исключение в тексте)

ex = {"Exception has been thrown by the target of an invocation."}

     Data = {System.Collections.ListDictionaryInternal}

     HResult = -2146232828

     InnerException = {"Insufficient memory to continue the execution of the program."}

     Message = "Exception has been thrown by the target of an invocation."

     Source = "mscorlib"
...