Ошибка инициализации PDF-документа iText при вызове из DLL через Catia, но не через exe ⇐ C#
Ошибка инициализации PDF-документа iText при вызове из DLL через Catia, но не через exe
I have a DLL program that's invoked through Catia with the following snippet:
Sub CATMain() Dim myMainWindow As MyApp.Session Set myMainWindow = New MyApp.Session myMainWindow.CATIA = CATIA.Application myMainWindow.DisplayProgram End Sub I had registered the myApp DLL using "%windir%\Microsoft.NET\Framework64\v4.0.30319\Regasm.exe /codebase"
in myApp im using itext7 library for PDF manipulation and I have installed latest itext7 8.0.3. nuget package in my project.
when the program reaches the following line:
iText.Kernel.Pdf.PdfDocument pdfDoc = new iText.Kernel.Pdf.PdfDocument(reader, writer); The error pops out: "the type initializer for 'itext.Commons.Actions.EventManager' threw an exception".
Interestingly, if I run the program via the exe file, it works fine. Can anyone help me understand why this error occurs when invoked through Catia but not when directly run from the exe?
Thank you!
Источник: https://stackoverflow.com/questions/781 ... but-not-vi
I have a DLL program that's invoked through Catia with the following snippet:
Sub CATMain() Dim myMainWindow As MyApp.Session Set myMainWindow = New MyApp.Session myMainWindow.CATIA = CATIA.Application myMainWindow.DisplayProgram End Sub I had registered the myApp DLL using "%windir%\Microsoft.NET\Framework64\v4.0.30319\Regasm.exe /codebase"
in myApp im using itext7 library for PDF manipulation and I have installed latest itext7 8.0.3. nuget package in my project.
when the program reaches the following line:
iText.Kernel.Pdf.PdfDocument pdfDoc = new iText.Kernel.Pdf.PdfDocument(reader, writer); The error pops out: "the type initializer for 'itext.Commons.Actions.EventManager' threw an exception".
Interestingly, if I run the program via the exe file, it works fine. Can anyone help me understand why this error occurs when invoked through Catia but not when directly run from the exe?
Thank you!
Источник: https://stackoverflow.com/questions/781 ... but-not-vi
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Окно пользовательского управления Wpf dll не отображается при вызове из приложения exe
Anonymous » » в форуме C# - 0 Ответы
- 17 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Как в CATIA V5 открыть или вызвать свои catscripts, catvba и vbas из winform?
Anonymous » » в форуме C# - 0 Ответы
- 40 Просмотры
-
Последнее сообщение Anonymous
-