I am having a text file with few lines in them. I just want to send this file to printer of my choice. Why is this so hard? MSDN and google search points me to use : https://learn.microsoft.com/en-us/dotnet/api/system.drawing.printing.printdocument.print?view=dotnet-plat-ext-6.0
But when I use the above code in my VS Code it giving me errors when building because "PagePageEventArgs" is available only in System.Drawing.Common. However, I couldnt install that in my VS Code even through NuGet Package manager.
First of all codes in above lnik looks like it is designed for a windows form and it has too much details. I get so many other errors with all those codes. I am new to programming and these is overwhelming for me and I am stuck with for a week. Can anyone please tell me how to just print a text file (all the lines in text file) using printer of my choice.