How to print a flumulario containing tables (grid) via c#

Asked

Viewed 82 times

0

I need to generate a crediario card impression similar to the one that is attached. I have no idea how to do this, what tool to use. Could someone give me a hint?

Thank you very much.

inserir a descrição da imagem aqui

1 answer

1


You can do this using Printdocument. The _Printpage event of the Printdocument object has as parameter Printpageeventargs that makes it possible to draw Strings and Lines in your document for printing.

To write Strings to the document for printing use:

e.Graphics.DrawString(string S, font Font, Brush brush, PointF point);

To draw lines use:

e.Graphics.DrawLine(Pen pen, Point pt1, Point pt2);

I recommend reading the following articles: How to print documents - Macoratti: http://www.macoratti.net/09/09/c_prn1.htm

How to print documents - MSDN: https://docs.microsoft.com/pt-br/dotnet/api/system.drawing.printing.printdocument.print?view=dotnet-plat-ext-3.1

Drawline MSDN function: https://docs.microsoft.com/pt-br/dotnet/api/system.drawing.graphics.drawline?view=dotnet-plat-ext-3.1

  • David, thank you so much for your help. Hug.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.