• 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

Printing a PDF on client side

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a PDF file on server side and I want that to be printed on client side, is there any way to print the file which exists on server to client side. Is it possible with javascript. If anyone knows could you help me regarding this.

Thank You.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to open up the file and call window.print().

http://radio.javaranch.com/pascarello/2005/05/12/1115923069346.html

Eric
 
Ramesh Pappala
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric, Thanks for your reply.

But I don't want to open the file on client side, I want to give the server side generated PDf file to the client side printer directly. That means for me the file will be created and placed on server side and I want to send that file to the printer that was configured on client side without opening the file.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you read what I said on my blog, you HAVE to open it to print it with JavaScript.

Eric
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A signed applet would be an alternative.
 
Ramesh Pappala
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear Bibeault, Thanks for your reply.
If you have any sample code could you post it.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not. If that is the route you are interested in pursuing, let me know and I will move this post to the Applets forum.
 
Ramesh Pappala
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Bibeault, if I can get solution in applet forum please move this to applet forum.

Thank you.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using a UNIX server,
and if that server can access the client's printer via an Internet Printing Protocol (possible in an intranet configuration), you can use CUPS (using it's Ghostscript interface) to directly send PDF files to your client's printer.

That is how our ERP system prints graphical documents to our printer:
The printers have a fixed ip address, and are reachable from our unix server.
On the unix server, all our printers have their own print queue.
The reporting system generates pdf files, and sends the file to the appropriate print queue on the unix server.

Regards, Jan
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic