Printer activities

Hello,

I need to create a process that automatically prints documents. The printer name and file will come from a Database query. I just need help with printer activities.

The process basically loops through a datatable and prints each PDF file to the appropriate printer.

Can someone recommend printer activities? I was thinking about using Printer Activities by RPAby.pw but i’m not sure how to install it. I don’t see them in Manage packages

Any help would be greatly appreciated.

Thanks,

Tim

Hey @timothy.mullady
you can use powershell script to do it:

$printerName = "\\ServerName\PrinterName" # Use the full printer name as it appears in your system
$filePath = "C:\path\to\your\document.pdf" # The full path to the document you want to print

Start-Process -FilePath $filePath -Verb Print

image

1 Like

Hi @pikorpa,

How would I pass the two variables into Powershell script? I’m not familiar with powershell but I will research it a bit.

Thanks,

Tim

@timothy.mullady
you can use this activity:

1 Like

@pikorpa , I was able to add the activity and update $printerName and $filePath but it doesn’t print.

It’s seem to run without any error but nothing print or hits the que

@timothy.mullady
first try use this script directly in powershell with your printer name and document name.
I tested it on shared printer on print server and it worked.

Thanks @pikorpa . I got it to run. I forgot that I removed a space in the file path and didn’t correspondently adjust the script.

1 Like

Super. I’m glad it worked :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.