Printer queue

Hi All,
Please help with this issue: how can I check the printer queue status (e.g. was specific document printed? is printer still working or it had a paper jam?)

Hello fellow…

first of, what’s your first thought ? like I would open the queue but, how would I know which files I’ve sent are they in a list somewhere, should I be monitoring whats is coming in and get the list from there?

I am thinking that you could use a simple loop and a couple of activities like getting the status based on what it “says” like printed or cancelled ?

let us know how are you doing so far… :slight_smile:


Hi @beesheep, Unless I will find an easier to implement solution, my first thought is to implement custom activity based on System.Printing Namespace | Microsoft Learn, activity that I will be able to use later in another workflows.

1 Like

@badita: Salut Mihai, do you know why I am getting this error? Code has no arguments and only one line of code as in the attached image. The System.Printing is imported. Thanks

Happy New Year to everybody!

Any thoughts about the error above?

Salut Doru,

Can you check in variable types if you can find “LocalPrintServer”? How did you import the namespace? It appeared by default when you searched in Imports tab? And please provide Studio version. In my CE 2017.1.6522 i had to copy the System.Printing.dll to the installation folder and still sometimes it doesn’t find the namespace.

Still investigating. Thanks for the patience!

1 Like

@ovi: Thanks a lot. Here are the answers:

  1. Studio Version:
  2. It appears in Import tab:
  3. The type does not appear even if some other types from same assembly are available for selection:

Edit: I did not copied any dll to installation folder

1 Like

Ok, so you don’t need to copy the dll. Your variable type screenshot shows the System.Printing from ReachFramework not from System.Printing as it should. The error is because your ps variable is not defined as LocalPrintServer type.

What i did was: in the xaml file where you import the namespace add this line
<AssemblyReference>System.Printing</AssemblyReference> under <TextExpression.ReferencesForImplementation>
Then restart Studio(just as a precaution), import System.Printing again and check for the LocalPrintServer variable type.

This workaround did the job for me. Hope it works!

1 Like

Thanks! It works now.

Did not worked directly after adding assembly reference in xaml file (Invoke Code still generated error), but after I have added also a variable with type LocalPrintServer in the workflow it worked. The variable in the workflow had nothing to do with variable defined in the code.

1 Like

Doru, could I please have a look at the file you created? Any chance you could upload it here. I am making a program that needs to check which printer is default. However, I think I could use partly the same code.


Here is a custom activity i made. that gives the outputs you are looking for: