• Post Reply Bookmark Topic Watch Topic
  • New Topic

PrinterJob is not working in Windows7 and application deployed in weblogic server

 
shiva kore
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I am facing problem while printing PDF document using PDFRenderer in server. The following code works fine in local environment. but in Server its not working even it does not through any exception in console aswell. Do we need to make any server specific configuration for PrinterJob. Please suggest..



 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post the complete, working code. Where does "pjob" come from? It looks like it should be a parameter to your print() method, but it's not being passed and your print() doesn't take a parameter. And where are you catching the PrinterException? Your call to print() should be in a try-catch block.
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Printing documents on the server is an unusual thing to do. I don't know what "local environment " means but perhaps you don't have any printers attached to the server?
 
Knute Snortum
Sheriff
Posts: 3272
84
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is too hard a question for beginning Java, moving to IO...
 
shiva kore
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi J. Kevin ,

Following is the code which is working perfectly in locally deployed web application in my web logic. But When I am testing it same scenario in server where application has been deployed in system which is having Windows standard 2008 operating system and weblogic appln server.

Its not throwing any exception also its getting halted in between when control reaches to PrinterJob even I tried to find route cause by doing remote debugging it dint help...

 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I may be incorrect here, but it looks to me like this is going to print to the default printer on the local machine which would be the server. Is there a default printer defined on the server?

I'm not clear on how you are running this. Are you launching it from a mapped network share?
 
shiva kore
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes default printer has been configured on the server.Launching this code from UI button onclick action it will invoke print method .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!