Convert Excel to PDF error: No Printers Installed

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Converter for .NET (v1)  /  Convert Excel to PDF error: No Printers Installed

DynamicPDF Converter for .NET (v1) Forum

Hi,

I am trying to convert an Excel file to PDF on a Windows 2003 Server.  I have a service running which creates reports in Excel first, then converted them to PDF using your DynamicPDF Converter module.  When it tries to run the following code, I get the following error:
***********************************************************
string inputFileName = sSaveAs.Replace("//", "\\");
string outputFileName = sSaveAsPDF.Replace("//", "\\");
Converter.Convert(@inputFileName, @outputFileName);
***********************************************************
Error:
***********************************************************
System.Exception - System.Exception: Conversion failed ---> System.Drawing.Printing.InvalidPrinterException: No printers are installed.
  at bc.b(ac A_0, ac A_1)
  --- End of inner exception stack trace ---
  at ceTe.DynamicPDF.Conversion.Converter.Convert(ConversionOptions conversionOptions)
  at ceTe.DynamicPDF.Conversion.Program.a.b()
  at ceTe.DynamicPDF.Conversion.Program.a(Byte[] A_0)
  at ceTe.DynamicPDF.Conversion.Program.a(Object A_0)

StackTrace:
  at ceTe.DynamicPDF.Conversion.Converter.Convert(String sourceFilePath, String outputFilePath, ConversionOptions conversionOptions)
  at PCIM.Common.ReportGen.PopulateReports(DataRow drProd, DateTime asatDate, Boolean frenchRpt) in C:\Inetpub\wwwroot\PCIM.redux\PCIM.Common\ReportGen.cs:line 478

-----------------------------------
InnerException #1:System.Exception
System.Exception: Conversion failed ---> System.Drawing.Printing.InvalidPrinterException: No printers are installed.
  at bc.b(ac A_0, ac A_1)
  --- End of inner exception stack trace ---
  at ceTe.DynamicPDF.Conversion.Converter.Convert(ConversionOptions conversionOptions)
  at ceTe.DynamicPDF.Conversion.Program.a.b()
  at ceTe.DynamicPDF.Conversion.Program.a(Byte[] A_0)
  at ceTe.DynamicPDF.Conversion.Program.a(Object A_0)

StackTrace
  at g.a(Object A_0)
***********************************************************

I have Excel 2007 installed on the server along with the DynamicPDF Converter appplication.  Is there anything else I need to do?  If I have to add a printer, what do I need to do, as I don't have any printers availavble on the Win 2003 Server (it is at a hosting site)?

Thanks,
Mark
Posted by a ceTe Software moderator
Hello Mark,

It looks like the Converter printer is not installed in the system where the converter service is running. Our Converter product uses a Converter printer and a Converter service along with the Converter dll.

Installing our Converter product will install a Service and a Printer in the system. Please make sure that you have the printer in the Printer and Faxes of your system. If you do not have please try reinstalling the product by uninstalling it fully.

If you are still not getting the printer then you may have to install it manually. Please try reinstalling the product and it may solve your problem.

Thanks,
ceTe Software Support Team.
Hi,

I did have to uninstall and reinstall the DynamicPDF Converter product, as I didn't have the DynamicPDF Converter Printer installed.  I now have both the Printer and the Service running, but I still get this error:

**********************************************************
System.Exception - System.Exception: Conversion failed ---> System.Drawing.Printing.InvalidPrinterException: No printers are installed.
  at bc.b(ac A_0, ac A_1)
  --- End of inner exception stack trace ---
  at ceTe.DynamicPDF.Conversion.Converter.Convert(ConversionOptions conversionOptions)
  at ceTe.DynamicPDF.Conversion.Program.a.b()
  at ceTe.DynamicPDF.Conversion.Program.a(Byte[] A_0)
  at ceTe.DynamicPDF.Conversion.Program.a(Object A_0)

StackTrace:
  at ceTe.DynamicPDF.Conversion.Converter.Convert(String sourceFilePath, String outputFilePath, ConversionOptions conversionOptions)
  at PCIM.Common.ReportGen.PopulateReports(DataRow drProd, DateTime asatDate, Boolean frenchRpt) in C:\Inetpub\wwwroot\PCIM.redux\PCIM.Common\ReportGen.cs:line 478

-----------------------------------
InnerException #1:System.Exception
System.Exception: Conversion failed ---> System.Drawing.Printing.InvalidPrinterException: No printers are installed.
  at bc.b(ac A_0, ac A_1)
  --- End of inner exception stack trace ---
  at ceTe.DynamicPDF.Conversion.Converter.Convert(ConversionOptions conversionOptions)
  at ceTe.DynamicPDF.Conversion.Program.a.b()
  at ceTe.DynamicPDF.Conversion.Program.a(Byte[] A_0)
  at ceTe.DynamicPDF.Conversion.Program.a(Object A_0)

StackTrace
  at g.a(Object A_0)
**********************************************************

I had installed the 64-bit product on the server but I used the 32-bit product and DLL in my web service.  Would this cause an issue?

Please help.

Thanks,
Mark
Hi,

Further to my last post, I tried unistalling the 64-bit version and installing the 32-bit version, but the 32-bit version didn't install the DynamicPDF Converter printer.  Only the 64-bit version does.  Is this an issue with the installer or is this an issue between 32- and 64-bit versions?

Thanks,
Mark
Posted by a ceTe Software moderator
Hello Mark,

The DynamicPDF Converter product has two different MSI to install the product on x32 bit and x64 bit operating systems. You will have to use the respective MSI otherwise the installer will not work properly. The dll's you reference in your project are the same for both the installers so it does not matter if you reference the 32 bit dll's in your service and run the service on a 64 bit machine, also the DynamicPDF Converter needs to be installed on the server where your service is hosted.
Please uninstall the current product and reinstall the product using the correct MSI depending on the OS you are using(x32 bit or x64 bit). This should work for you.


Thanks,
ceTe Software Support Team.
Hi,

Thanks for your help.  I have managed to get this working, but I did have a few "No Printers Installed" errors before it worked.  I rebooted my Server, and it seems to be working now.  I am testing it out with a variable number of reports to generate (1, 2, 3, all) so I will see how this performs.

If I have any other issues, I will post another thread.

Again, thanks for your assistance.

Mark
Hi,

Well so much for this working.  I managed to get an entire set of reports (18-20) to generate and convert to PDF.  But when I tried to generate more reports, it keep getting the same "No Printers Installed" error I was getting before.  If I reboot, it will work again.

Is there something I need to do at the end to make sure the Converter clears itself from memory when it is finished?  Do you know why this might be happening?

Need help.

Thanks,
Mark
Hi again,

One thing to note; when we start getting the "No Printers Installed" errors, if I restart the DynamicPDF COnverter service on our webserver, we can generate reports with our code again.

So something is happening with the service when we run a large set of reports or after running a number of single or small report sets.

Is there anything that can be done in the code to make sure the memory is cleared or the service is stable?  I need this resolved or we can't use your product.

Thanks,
Mark
Posted by a ceTe Software moderator
Hello Mark,

We have not seen this error before, can you please try converting files other than excel (like word or text) and see if that causes the same exception? If you are able to convert the other file formats without any issue, please send us some of the excel documents you are converting to our Support Team so we can do some testing and try to recreate the issue. Please refer to this forum message in your email.

Thanks,
ceTe Software Support Team.
Hi,

I can't convert Word doucment because I don't have Word installed on our web server.  And as I don't need to convert Word documents at this time, I won't be installing it.  I did try converting a simple text file and it worked.

But after running a number of full report sets (about 18 in each) for a few quarters it eventually stopped working with the "No Printers Installed" errors previously indicated.  And it continues to not work until I either 1) restart the DynamicPDF Converter service or 2) reboot the machine.  It also starts working again if I uninstall and reinstall my Report Generator service.

So I can't explain it.  If I can't get this resolved, I will be forced to find another solution, likely with another company.

Thanks,
Mark
Posted by a ceTe Software moderator
Hello Mark,

One of our other customers just reported a similar issue, it is being caused by an excel file which they sent to us. When you try to open this excel file it will show a dialog box asking for user input or one of the sheets is set to Page Break Preview mode. Please send an email referencing this post to our Support Team so we can send you a configuration utility that will likely fix this issue. It would be great if you can send us the excel document as well, so we can do some testing and positively identify the issue.

Thanks,
ceTe Software Support Team.
Hi,

I sent an email to your Tech Support group regarding this issue and asking for the utility fix when it is ready.  I haven't had this issue happen for a bit, and I am continuing to test this to make sure it is still working properly.

If I encounter any more issues, I will reply to this post.

Thanks,
Mark
Posted by a ceTe Software moderator
Hello Mark,

We did receive your email, however we were not able to reply to your email as it keeps bouncing back due to your spam filter. Can  you please add support@cete.com to your safe senders list so we can reply to your emails.

Thanks,
ceTe Software Support Team.
Hi,

I have added your cete.com domain to my safe senders list, so please try sending me an email again.

Thanks,
Mark
Do we have any solution for Mark last issue "No printer Installed"
Posted by a ceTe Software moderator
Hello,

We have not seen this "no printer installed error" while using DynamicPDF Converter for .NET product. Please try using the latest DynamicPDF Converter for .NET product and this should work for you. You can download the very latest DynamicPDF Converter for .NET product from our website here.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 12:47 AM.