Hello ,
We are using AsposeWordsPrintDocument to print some documents from the serverside. Sometime the print fails with an exception saying “There are no available print services”. It seems that once we get this exception , then one cannot print anymore.
My questions are
1 - What could cause Aspose to throw an error with a message “There are no available print services”. ?
2 - Are there any settings that one need to configure for printing documents concurrently ? ( By multiple users at the same time)
Thanks
Raj
Hi Raj,
Hello Aspose team,
Thanks for your response. The version of JDK that we are using is jdk1.7.0_17. Based on your input we tried using the latest version but without luck. It seems that we get this error when there is a good load on the server , in the sense that there are good number of print requests from the application.
Next to this , we also found another issue that when there are concurrent requests for printing of documents with multiple styles ( First page should pick up paper from tray 1 and the rest of the pages from another tray , which is specified in the template of the word document) , it seems Aspose creates multiple jobs for each style , in this case two print jobs for every document. This results in the ordering issues , where the first page of one document is ordered next to another document in case of concurrent print requests.
Kindly let me know if you need further explanation or more details.
Thanks
Hi Raj,
PrintService prnSvc = null;
PrintService[] pservices = PrintServiceLookup.lookupPrintServices(null, null);
if (pservices.length > 0)
{
int i = 0;
while (i < pservices.length)
{
if (pservices[i].getName().endsWith(“YourPrinterName”))
{
prnSvc = pservices[i];
break;
}
i++;
}
}
if (prnSvc != null)
{
// print documents
}
Ok. Thanks for the response. Will try to work around this Java Print API limitation.
Reagards
The issues you have found earlier (filed as WORDSJAVA-817) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(14)