Printing Mirror Image

nehanjali2000

New member
Joined
Dec 28, 2005
Messages
3
Programming Experience
1-3
Hello All,

I could able to print the contents of a Printdocument which has a collection of Label and Picturebox controls. The report looks fine.

Now my problem is printing the report in a mirrored way(i.e Flip Horizontally) using VB.NET as all printers have no such options

Thanks in advance

Neha
 
I would suggest that rather than drawing all your strings, etc. on the printing surface you should draw them on a bitmap object. That way you can use its RotateFlip method to create a mirror image and then print that using the DrawImage method.
 
Excellent Idea (But Text data is pixilating)

Dear jmcilhinney,
Thank you for giving me this excllent Idea of writing intially to a bitmap object then Flip & Printing.

It worked out for me in this process, but the quality of the text data is not good ( Pixilating) as it was painted from a bitmap , can you please suggest me how to solve this

Thank you

Neha
 
RotateTransform is the key ... i.e.
VB.NET:
[COLOR=seagreen]'MIRRORED TEXT[/COLOR]
e.Graphics.ResetTransform()
strWidth = e.Graphics.MeasureString(BMarginCaption, pFont).Width
strHeight = e.Graphics.MeasureString(BMarginCaption, pFont).Height
X = PageWidth - RMargin - (PrintWidth - strWidth) / 2
Y = PageHeight - (BMargin - strHeight) / 2
e.Graphics.TranslateTransform(X, Y)
e.Graphics.RotateTransform(180)
e.Graphics.DrawString(strTextExample, pFont, Brushes.Black, 0, 0)


Take a look at the attached project and you'll see the complete code how you can manipulate objects to appear as you want.

Regards ;)
 

Attachments

  • FlipTheStringForMirrorPriniting.zip
    30.7 KB · Views: 55
Excellent Kurom,

You are correct, I did the research and worked on the Matrix Transformation just before I saw your reply. This is the only way to work on this issue, and I got a quality output without any pixilation of text .

We can play wonders with Matrix Transformations. Thank you for your kind support.

Regards

Neha
 
Back
Top