Cannot create ActiveX component

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
magicstarmike
Posts: 4
Joined: Tue Jul 27 2004

Cannot create ActiveX component

Post by magicstarmike »

I am running into the following issue on Windows XP.

I am using Installshield to install Amyuni. The printer appears to install. I see the printer listed with other printers and the registry keys are created.
However, when my application attempts to use the printer I get the following error:

Reports could not be converted to PDF. System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

We will need to know when in your application you are getting this message.

Did you include a reference to the ActiveX interface of CDIntf in your application?

Are you initializing the printer properly?

We need some further information to be able to help you.
magicstarmike
Posts: 4
Joined: Tue Jul 27 2004

Post by magicstarmike »

Amyuni> Did you include a reference to the ActiveX interface of CDIntf in
Amyuni> your application?

We add as only reference to the Amyuni SW: CDIntfNet.dll

Amyuni> Are you initializing the printer properly?

We do (in C#):

static AmyuniDriver pdfPrinter = null;
...
and in the method:
...
try
{
if ( pdfPrinter == null )
{
pdfPrinter = new AmyuniDriver.Hp.San.SanXpert.Amyuni.AmyuniDriver();
}
}
catch (Exception ex)
{
pdfPrinter = null;
Trace.WriteLineIf(reporterSwitch.TraceError, "PDF Converter could not be started: " + ex.Message);
}
if ( pdfPrinter == null )
{
Progress ("PDF conversion not available because no conversion printer " +
"could be installed.");
}
else
{
try
{
retVal = pdfPrinter.Convert(rptFullSource, rptFullOutput, wdApp);
}
catch(Exception exp)
{
Progress("Error Converting " + report.Type.ToString() +
" to " + m_exportTo.ToString() + " from: " + rptFullSource + ". " +
exp.Message);
}
}
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Are you calling EnablePrinter right before printing? I couldn't find the call to EnablePrinter in your code.


If after calling EnablePrinter you still get an error, please debug your application and tell us which line of code generates the error and what is the error message if this different from the first post.

Thanks.
Post Reply