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)
Cannot create ActiveX component
-
- Posts: 4
- Joined: Tue Jul 27 2004
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);
}
}
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);
}
}
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.
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.