Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

print a file from C#

private void SendToPrinter()
{
   ProcessStartInfo info = new ProcessStartInfo();
   info.Verb = "print";
   info.FileName = @"c:output.pdf";
   info.CreateNoWindow = true;
   info.WindowStyle = ProcessWindowStyle.Hidden;

   Process p = new Process();
   p.StartInfo = info;
   p.Start();

   p.WaitForInputIdle();
   System.Threading.Thread.Sleep(3000);
   if (false == p.CloseMainWindow())
      p.Kill();
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: take space separated input in c# 
Csharp :: which game engine is best 
Csharp :: order 3 integers in c# 
Csharp :: unity switch to scene and transfer data 
Csharp :: c# substring until character single 
Csharp :: c# get assembly directory 
Csharp :: c# normalize value 
Csharp :: get domain name from email in asp.net c# 
Csharp :: vb.net get date minus one day 
Csharp :: sequelize top 
Csharp :: linq datatable 
Csharp :: unity list get item at index 
Csharp :: declare string array c# without size 
Csharp :: c# goto statement 
Csharp :: distance between two objects unity 2d 
Csharp :: c# structure 
Csharp :: where to write fluent api 
Csharp :: c# destroy function...unity 
Csharp :: c# tab select tab 
Csharp :: label wpf 
Csharp :: c# compare dateTime with string 
Csharp :: .net json result status code not working 
Csharp :: stock span problem c# using class 
Csharp :: monegame deltatime 
Csharp :: unity draw waypoins path 
Csharp :: wpf change foreground c# 
Csharp :: extension method in c# 
Csharp :: Send Hotmail, Outlook, Office365 Email using SMTP C# .NET 
Csharp :: .net mvc foreach index 
Csharp :: how to make a system to check if i see certain object in unity 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =