• 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 on a Pre-printed paper using a web application

 
Ranch Hand
Posts: 56
Netbeans IDE Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ,

i am looking for a code by which i can print on a pre-printed sheet.

here is a sample,

A pre-printed sheet has the following.

Name:
Age:
Address:


now the code must accept input from user, and then print it on the sheet, such that the sheet looks even.

i really dont know what must be used here, any idea for this requirement will be very helpful.


Thanks in Advance.
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the printer located - on the server network, or on the client network?
 
Sachin Pachari
Ranch Hand
Posts: 56
Netbeans IDE Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The printer will be at the Client Network,

Is there any special name for this type of printing ?

i dont know how to accomplish this, is there any referrence site that i can use ?

the cliect might use different printers and they might have different type of pre-printed fromats, so what do you think is the best solution ?


Any suggestions are welcome.
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will have to create a page on the server -either in HTML or something that provides exact positioning, like PDF- and send that to the client. The user will then be presented with the usual print dialog and can take it from there.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think Tim's suggestion is the best you can get (I'd certainly use PDF in this case), but you still can get wrong results if the client messes up the print settings (eg. chooses Letter instead of A4 page format). You don't have any direct control over these settings.
 
Sachin Pachari
Ranch Hand
Posts: 56
Netbeans IDE Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for the quick reply,

I just disscussed with my friend about the possiblity to provide a printalble area in the web application and then show the sample of the print, and then print it, is there a possiblity to do that ? can anybody help me with this ?

The PDF is a good plan but, i should be able to show the sample before i start to print, because i have to show the full content to the user and then, print only the required part, so i dont think pdf will be the right plan.

Please help me on this.

Thanks in advance.



 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could create two PDFs - one to show the user, one to print. The problem with HTML is that each browser will have its own idea of how to lay it out, exactly.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would seriously consider printing the whole form plus data with a PDF and ignore the existance of the pre-printed paper.

Bill
 
Sachin Pachari
Ranch Hand
Posts: 56
Netbeans IDE Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply

Really nice idea, and i would do it if it was my project, but the requirement is this, so i cant change it.

so is there anything that you an help me with ?
 
Tim Moores
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From what you've said so far it seems that the PDF approach (with either one or two PDFs) would be perfectly feasible. Apparently you do not think so?

Oh, and by the way: sometimes you have to challenge requirements if they make no sense, or if they are much more difficult to implement than something very similar which may very well be just as satisfactory to the user; that's why you almost always need to talk to users.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps your management got stuck on the idea of preprinted paper for no good reason and you an be a hero by suggesting an all PDF solution.

Consider the example of Income Tax forms in the USA - for the second year my 1040 form was downloaded from the IRS, filled out in Adobe reader and only then printed as form plus data input, thus saving lots of trees and IRS expense of creating tons of forms most of which are never used.

Bill
 
We don't have time to be charming! Quick, read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic