Sending word.docx to default printer without dialog
I am using freeSpireDoc to create a word document wich is fine doing the job I also need to print that document directly to default printer and I think using the freespire prevent using the microsoft drowing.printing , any help will be appreciated .this is the code:
using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;
using Spire.Doc.Formatting;
using System.Diagnostics;
using System.Drawing.Printing;
using TextBox = Spire.Doc.Fields.TextBox;
namespace Traite
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void BtnPrint_Click(object sender, EventArgs e)
{
Document doc = new Document();
doc.LoadFromFile(@"Sample.docx");
PrintDocument printDoc = doc.PrintDocument;
printDoc.PrintController = new StandardPrintController();
printDoc.Print();
BtnPrint.Visible = false;
BtnSave.Enabled = true;
}
private void sendToPrinter(string doc)
{
throw new NotImplementedException();
}
}
}