File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing a PDF on client side

 
Ramesh Pappala
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A signed applet would be an alternative.
 
Ramesh Pappala
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault, Thanks for your reply.
If you have any sample code could you post it.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Bibeault, if I can get solution in applet forum please move this to applet forum.

Thank you.
 
Jan Cumps
Bartender
Posts: 2577
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic