Click here to Skip to main content
16,016,345 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi .


Am buliding a receipt generator application using C#. Now am facing a problem.


I created some receipt templates using

Graphics.Drawline and it is done perfectly .. but then came the real trouble. Now i want to change my page size . The task ahead of mine is

if i select a page size A4 then the receipt should come in A4 . if the page size is lesser then the receipt should also come in small format .

I have some questions:

1. Should i increase or decrease the lines length according to the papersize?

2.Is there any problem if am defining each line with specific co-ordinates? ie: while drawing a receipt i never allovated any co-ordinates to any variables.

3. How can i achieve this tasks :-D ?
Posted
Updated 28-Jan-11 22:27pm
v2
Comments
Sunasara Imdadhusen 29-Jan-11 4:27am    
Don't use URGENT word!!

1 solution

Provided that you are using the Width and Height parameters to draw your lines, rather than fixed lengths such as "1000" or "675" you should be fine. If you are using absolute values, then you will have problems.

Try it! Use Print Preview (enable it for testing if you don't have it for release) and see what happens - it is a lot quicker and more efficient in terms of paper...
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900