• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Printing a PDF on client side

 
Ranch Hand
Posts: 50
  • 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.
 
author
Posts: 15385
6
  • 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
  • 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
Posts: 15385
6
  • 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
 
Marshal
Posts: 67279
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A signed applet would be an alternative.
 
Ramesh Pappala
Ranch Hand
Posts: 50
  • 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
Marshal
Posts: 67279
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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
  • 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.
 
Bartender
Posts: 2653
18
Netbeans IDE C++ Linux
  • 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
 
Hey cool! They got a blimp! But I have a tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!