It is the net maui 8.0 project. On macos, Aspose.Words.Pdf2Word is used. When converting pdf to docx, an exception occurs.
Exception has been thrown by the target of an invocation.
The type initializer for ‘Aspose.Words.Pdf2Word.PdfDocumentReaderPlugin’ threw an exception.
exception infomation:
2024-07-0212:34:42.545Info]>ConvertPdfToDocx 33 filename
=/Users/hotsoon
Documents/LW LAB190027 D0R Consumer Brochure_V24_spreads.pdf
2024-07-02 12:34:42.546Info]>ConvertPdfToDocx newfilename = /Users/hotsoon
Documents/LW LAB190027 D0R Consumer Brochure_V24_spreads.docx
2024-07-02 12:34:42.631 Info]>[DocumentFormatConvert]ConvertFile Failed! ex
=Exception has been thrown by the target of an invocation.
2024-07-02 12:34:42.633 [Info]>[DocumentFormatConvert]ConvertFile Failed! St
ackTrace =
at Aspose.Words.Document.v(Stream d,LoadOptionsv)
at Aspose.Words.Document.d(Stream d,LoadOptionsv)
at Aspose.Words.Document..ctor(String fileName, LoadOptions loadOptions)
at Aspose.Words.Document..ctor(String fileName)
at DemoMauiApp.Common.DocumentFormatConvert.ConvertPdfToDocx(String filename
String newfilename)in /Users/hotsoon/program/DemoMauiApp/Common/Doc
umentFormatConvert.cs:line 95
2024-07-02 12:34:42.633 [Info]>[DocumentFormatConvert]ConvertFile Failed! ex
InnerException.Message=The type initializer for 'Aspose.Words.Pdf2Word.PdfDoc
umentReaderPlugin'threwanexception.
2024-07-02 12:34:42.634[Info]>[DocumentFormatConvert]ConvertFile Failed! ex
InnerException.StackTrace=
at System.Reflection.MethodBaseInvoker.Interpret
edInvoke Constructor(0bject obj,IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFl
ags invokeAttr)