System.Printing.PrintQueueException: PrintTicket provider failed to bind to printer. Win32 error: Access is denied
问题 I have an application where I want to print a Word document. I am using third party GemBox software, and in my development environment this code works; public void OutputLetter(string outputFile, string placeholder, string newText) { using (var document = DocX.Load(this.InputFile)) { document.ReplaceText(placeholder, newText); document.SaveAs(outputFile); } this.PrintDocument(outputFile); } private void PrintDocument(string outputFile) { var document = DocumentModel.Load(outputFile,