-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Architecture for printing
PostPosted: Wed Jul 14, 2004 5:13 am 
Newbie

Joined: Wed Jul 14, 2004 4:36 am
Posts: 3
Location: Noviglio, Italy
Hello to everybody
This is my first post here, and I must admit: it is quite off-topic. Please don't blame me :)

The question is about architecture. I'm managing a project aimed to rewrite an old software, and I choosed JBoss (for sessions and transactions) + Hibernate + Struts.

Everything fits well in this architecture, except printing: the old software was a distributed app installed on every pc, and printing things like invoices or notes was easy.

Now the new app is a web app, and printing should be made through download of pdf files or similar stuff.
But there is still a strong need to print in a very direct way, I mean without much user interaction. Immagine the user launching a function and, while the browser receives the page, the local printer starts printing, say, a bar code on a thermal paper.
(the heavy industrial environment requires this fast interaction)

In this latter case, moreover, the printer receives plain text, not pdf.

I squeezed my brain, obtaining vague ideas about xml translation (xml document -> xslt -> plain text) and some javascript code to print it.

The question is: what is the right way to do this in a web-centric application?

(having all the local printers shared on the server isn't a good solution)

Many thanks
Enrico


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 14, 2004 6:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I think you can invoke printing using some javascript or activex stuff. Probably that would be a solution.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 14, 2004 8:49 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
If it has to look nice, generate a PDF with libpdf on the server. You can even do this asynchronous and provide the PDF on a Windows/SMB share once it is rendered.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 14, 2004 9:05 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
one word about pdf, it is 5 (in general) times more expensive than postcript for a printer server to analyse.
So if you look at doc generation tools, have in mind that, as pdf) ps is generable from XML.
Unfortunatly FOP for example supports PS only in beta version.

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 14, 2004 9:47 am 
Newbie

Joined: Wed Jul 14, 2004 4:36 am
Posts: 3
Location: Noviglio, Italy
Many thanks to you all.
This morning's post and the kind replies made me think over that the answer is the internet printing protocol (IPP), because a browser will never print even a line without user confirmation (imagine the caos if it would be possible)

So, looks like that the official way to print in a web environment is to give any (local) printer an URL, and from the application server simply to send documents to that URL.

Enrico


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.