0

I am doing a Windows service using visual studio 2012

I want that service to print something

I normally can print stuff, but in this case, I got that System.Drawing.Printing is not available

could you help me please

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {}
Marco Dinatsoli
  • 10,322
  • 37
  • 139
  • 253

2 Answers2

3

System.Drawing.Printing.PrintPageEventArgs class live in System.Drawing.dll assembly. So you must add the reference to System.Drawing assembly in order to use it.

If you have the assembly reference in place and still you get the error? Please refer my answer here

Community
  • 1
  • 1
Sriram Sakthivel
  • 72,067
  • 7
  • 111
  • 189
0

For some reason you need to have a reference to "ReachFramework" to make System.Printing.PrintTicket and System.Printing.PrintCapabilities