Click here to Skip to main content
14,269,309 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi,

I have an Invoice Receipt like this :

                         < Invoice Receipt >                        Receipt No : 1

First Name :                                         Last Name : 

Age        :                                         Address   :

Amount Paid : 


Date of Payment : 


User insert this receipt paper in dotmatrix printer & hit print from web application then user information should display in front of their corresponding titles.

It is a web application, can anyone please help me how to achieve this.

Thanks in Advance.
Posted
Updated 13-Feb-13 19:25pm
v3
Rate this:
Please Sign up or sign in to vote.

Solution 1

As you are printing on the client you need to provide the client with suitably formatted html (or other file type)

You can use a print style sheet (see here[^] for a good explanation.

Alternatively you can build (say) a PDF file server-side and provide it to the user to print.
   
Comments
Aditya Magotra 14-Feb-13 1:41am
   
hi, thanks for reply.
If receipt paper size is half of A4 page, Can you please let me know whether Solution 1 will work or not.
If not then what should i suppose to do to fix it.
Rate this:
Please Sign up or sign in to vote.

Solution 2

You could certainly do it for a single page with CSS - if you want to print multiple pages 'in one go' it would be harder.

Is it necessary to have pre-printed stationery? It would be far easier to print the titles and the data together

With CSS you can specify sizes in cm (for example) so with a bit of experimentation you should be able to get it to line up OK.

If you need to be exact, then probably generating a PDF server side is the way to go. More complex to do - but there are libraries out there (such as textSharp) that would help you do that.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100