on 02-02-2009 9:44 AM
Hi,
I created one custom action block.
Its purpose is to get list of printers configured on the server and then print the pdf
document through one of the printers.
The java code gives the list of printers when executed on eclipse.
However when the code is developed on the server, itu2019s not able to give the list of printers.
Below is the code snip, which does the lookup service.
PrintService aprintservice[] = PrintServiceLookup.lookupPrintServices(null, null);
for (int i = 0; i < aprintservice.length; i++)
{
ilog.info(aprintservice<i>.getName());
}
The above code doesnu2019t print any printers configured on the server.
Any suggestion / help will be highly appreciated.
Thanks,
Vishal Jadhav
Vishal, you need to realize that when running Eclipse, you're logged in to the operating system as a user, whereas when running within the MII server, you're likely logged in as the System Account or Network Account, and therefore probably do not have any printer(s) configured or associated with that account, or permission to access them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using 11.5 . I logged in the system with user <XY>.
I configured some printers for user <XY>.
I also created a user <XY> with password same as system password in MII.
But when i accessed the action block through BLS i am getting
Not authorized to execute the transaction error.
One more thing i have xmii on the same system from where i am accessing it.
Thanks for quick response.
aprintservice<i>.getName() maybe? I know it worked in eclipse so maybe just a typo in the post.
As Rick pointed out, you have to configure the printers for the user the xMII service is running under. I think its most likely LocalSystem on windows.
The user you log onto xMII with makes no difference.
Hi,
I got your point that the custom action runs under the privilege of the user who has
installed the MII server.
So any mii user should get the list of printers configured on the system.
I installed xMII 11.5 server with my user id.
Also I configured some printers on same system.
But when I am trying to access that action using a trax , its not able to give me any printers configured.
Thanks for your quick help.
Hi,
we have developed a custom printing action for a customer. This action gets the printer name as parameter. Basically we did this with JDK 1.5 because of the better printer support. We therefore execute the code in JDK 1.5 tough invoked in 1.4. With this we can print any generated PDF to any network printer. Make shure the service runs with the appropriate user rights to see the printers.
Regards,
Matthias
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.