Click here to Skip to main content
15,902,922 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to print normal text on half page and mirror text on the other half page on an A4 size paper. I have used printdocument object to print. Normal text is printing fine, but now i want to print mirror image of the same txt.
How can i do this in
how can i print a mirror text using printdocument object in
Updated 24-Feb-13 19:42pm

1 solution

Print your text on bitmap and them mirror this bitmap.

To write on bitmap, you can first create an instance of System.Drawing.Bitmap with required size and pixel format:[^].

To draw on it, you will need to create an instance of System.Drawing.Graphics from your instance of bitmap using this static factory method:[^].

Now you can draw your text on bitmap using one of System.Drawing.Graphics.DrawString methods:[^].

To make a mirror image, you will need to work a bit with image pixels. To do that, use one of LockBits methods:[^].

Finally, use PrintDocument to draw converted bitmap.

Share this answer
mistryshailesh 25-Feb-13 2:45am    
Thanks for the answer.
But, I want to know the exact code, which shows how to write a mirror text . The soln that u gave me doesn't show me, how to use this methods to print a mirror text.
Sergey Alexandrovich Kryukov 25-Feb-13 11:43am    
No, you don't "want to know the exact code". The whole idea of "knowing the code" is wrong. You want to write the code, not having anyone to do your job. So, do it, ask questions if you stuck.

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