PDFCreator COM Exception

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>&nbsp;</p>

was dificult but do this....Uninstall all PDFCReators you have and install the version 1.0.1 , only worked like this.


Rafael Ramirez
No matter how much you know .....
The matters is ...
what do you do as you know.

I have something like this, but I using VBA coding. I know I can add reference at runtime http://msdn.microsoft.com/en-us/library/office/bb237750(v=office.12).aspx but others pc in my job have diferents versions of pdfcreator. 


The reference is not the same  to all versions and causes an error, so I needed to disable the pdfcreator functions. 

My code is a simple automatic pdf print from pdf sample examples, but crashes if the version is diferent from what I Added in the reference project



And the error shown is weird. The message is not about pdf but about anything else.

Hi,

do you get error 339?

regards,

Robin