Hi,
I am new to this forum and using PDFCreator API and I am asking for a little support. I want to introduce in my application the print to PDF functionalities. I downloaded the PDFCreator 1.0.0 version (the latest at that time). I am using C# so I added a reference to the Interop.PDFCreator.dll which version is 7.1.0.0 and is set to Copy local.
If my users have the same version of PDFCreator all in order, otherwise I receive the following error:
```System.InvalidCastException
Specified cast is not valid.
at System.Runtime.InteropServices.ComTypes.IConnectionPointContainer.FindConnectionPoint(Guid& riid, IConnectionPoint& ppCP)
at PDFCreator.__clsPDFCreator_EventProvider.Init()
at PDFCreator.__clsPDFCreator_EventProvider.add_eError(__clsPDFCreator_eErrorEventHandler )
at PDFCreator.clsPDFCreatorClass.add_eError(__clsPDFCreator_eErrorEventHandler )
at Matrix.Sms.Viewers.PrintToPdfHelper.InitPDFCreator()
<p>I kind force them to use the exact version I am using and also I cannot recompile my application always. So is there a way to avoid this error?</p><p>Thanks a lot for the support</p><p> </p>