Use Aspose.PDF with COM Interop DLL - API Throws Stack Overflow Exception

We are trying to consume the aspose.pdf for formatting PDF documents and to print the formatted document from a Delphi project, and we’ve created a dot net com library which uses aspose.pdf to do so.

The dot net library works fine while unit testing (or) when consumed as a direct dll in another dot net project but when invoked via COM interop from a delphi project we are getting the stack overflow exception on call to few of the apose.pdf functions.

The following are the lines causing the issue-

  1. When creating a TextStamp object
    Ex-
    TextStamp textStamp = new TextStamp(" ");

  2. On call to - pdfViewer.PrintDocumentWithSettings(…)

Note-

  • This is verified with multiple machines and with different aspose.pdf versions like- 20.4, 20.1, 19.12, 19.10

@Akshay73

Would you kindly share complete exception message with Stack Trace information. Also, please share some sample PDF document with complete code snippet that you are trying to run. We will further proceed to assist you accordingly.

Hi Asad,

I have created a sample project to demonstrate the issue and i have provided the instructions required to debug the solution in the read me file.

Please have a look at the attached file.

Thanks,
Akshay

Sample.zip (420.7 KB)

@Akshay73

Thanks for sharing sample project.

We have logged an issue as PDFNET-48163 in our issue tracking system. We will further look into details of it and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi Asad,

Thanks for the quick response.

May i know when will the fix be available?

Thanks,
Akshay

@Akshay73

The ticket has been logged under normal support model and it will be resolved on first come first serve basis due to low priority. However, we will keep you informed about status of its resolution within this forum thread. Please spare us some time.

We are sorry for the inconvenience.