• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..



 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
reply
    Bookmark Topic Watch Topic
  • New Topic