aspose file tools*
The moose likes Applets and the fly likes Printing a PDF on client side Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Printing a PDF on client side" Watch "Printing a PDF on client side" New topic
Author

Printing a PDF on client side

Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Sep 14, 2005
Posts: 50
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Jan 10, 2002
Posts: 61768
    
  67

A signed applet would be an alternative.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
Hi Bear Bibeault, Thanks for your reply.
If you have any sample code could you post it.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

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

Joined: Sep 14, 2005
Posts: 50
Yes Bibeault, if I can get solution in applet forum please move this to applet forum.

Thank you.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2516
    
  10

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


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Printing a PDF on client side