Questions tagged [system.printing]

80 questions
3
votes
1 answer

Exception occurred while creating the PrintServer object. Win32 error: The printer name is invalid

Hi, I'm getting this exception when I try to create printserver object. Here is my code: PrintServer printServer = new PrintServer(@"\\" + printServerName); PrintQueue printQueue = printServer.GetPrintQueue(printerName); I'm trying to get the…
Sagar
  • 399
  • 4
  • 11
3
votes
2 answers

Maximize Print Preview?

Is there any way to Maximize the Print Preview Dialogue? I could not see any Maximize property on the controls at properties window.
Graham Jones
  • 165
  • 4
  • 19
3
votes
1 answer

printserver throwing "Win32 error: The printer name is invalid." exception despite the server path provided is correct

I am out of idea why this is NOT working: PrintServer printServer = new PrintServer("\\\\servername"); I am having issue with the PrintServer initialization. The above mentioned exception keep appearing even the printerServer path provided is a…
David Lim
  • 31
  • 1
  • 4
2
votes
1 answer

modifying a print preview

I'm building a c# app that displays a print preview (of a document) and then asks the user(s) to 'sign' the document via a InkPicture control. I've got no problems extracting the Bitmap from the inkpicture control and applying it to the…
Steven Evers
  • 16,649
  • 19
  • 79
  • 126
2
votes
2 answers

Complex Printing task support for .net 4

I have been looking for tools which will allow to send documents (pdf,txt,doc,etc) to network printer. I am aware of the PrintDocument, Graphics to print text to Printer. what I am looking for is easy and less noise solution to achieve it i.e.…
swapneel
  • 3,061
  • 1
  • 25
  • 32
2
votes
0 answers

Check Physical Print Job Success

I am printing documents with System.Printing and would like to know when the print job is physically completed or stopped on the printer. The windows spooler automatically deletes the print job as soon as the printer accepts the print job, and…
luxdvie
  • 902
  • 8
  • 16
2
votes
3 answers

Access Denied when calling PrintQueue.Pause() method in C#.net

I'm trying to pause a windows 7 print queue using C#.NET visual studio 2008. I have full administrator rights but when I run the following code to Pause the Queue it says Access is Denied. Please help me. LocalPrintServer lps = new…
Zerone
  • 566
  • 4
  • 10
  • 24
2
votes
0 answers

Printing two columns with "address cards"

For an application i'm developing as my first c# project, i'd like to be able to print information from the application in a similar style as the 'card style' printing option that's available in outlook. I've created a User control that is layed out…
The Rookie
  • 21
  • 1
2
votes
1 answer

How to find which computer send the print job?

I'm creating a postscript printer for windows 7 which will accept print jobs and forward them to real printers. It will be shared in the LAN and can receive print jobs from LAN computers. I want to find out from which computer a print job came from…
Zerone
  • 566
  • 4
  • 10
  • 24
2
votes
1 answer

Custom print on DNP DS620 cutting problems

Hi everyone i'm currently using a DNP DS620 on a raspberry pi and i'm doing some printing with the lpr commands like lpr -P printername -o landscape picturename This gave me a picture of 4x6 inch (10x15cm) So i'm able to order some prints with a…
Gauthier
  • 165
  • 2
  • 14
2
votes
1 answer

Print queue monitoring: How to get info of caller application that initiated a print job?

Im currently writing a kinda print monitor app to run on a print server. The request is as follows: When a user is printing on a specific application, the information about the application which initiated the print job is necessary. When monitoring…
2
votes
0 answers

how do I set the source tray (InputBin) per page when using System.Printing to print?

I am trying to print a document using classes in the System.Printing .NET namespace. I have tried using PrintDialog.PrintDocument on a DocumentPaginator and building an XPS file and then using Queue.AddJob to send it, but I can't seem to find a way…
wizzardmr42
  • 1,634
  • 12
  • 22
2
votes
3 answers

How to print a pdf in C# by using

I used 'process' to print pdf file in C# app.But i cannot get the print status.I found that it is possible to interact with printer/queue with System.management and System.printing.I did a lot of trial n error using these two namespaces but couldnt…
Murali Uppangala
  • 884
  • 6
  • 22
  • 49
2
votes
0 answers

PrintQueueStatus returns None, printer is already turned off

I already turned off the printer, and my code still returns None Here is my code try { printServer.Refresh(); PrintQueue printQueue = new PrintQueue(printServer, cmbPrinters.Text.Trim()); printQueue.Refresh(); if…
SHINHAN
  • 685
  • 2
  • 12
  • 28
2
votes
3 answers

Printing EMF from a Windows service

I have some code that prints a document using the System.Drawing.Printing namespace. This now needs to be moved into a windows service. The documentation states that this is not possible, which would support my findings so far (in that it doesn't…
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269