Avatar of g_currier
g_currier
Flag for Germany asked on

SharePoint 2013 Print Library Item Automatically

While I have found the information I need to develop event handling for a specific list or library, what I have not found is a method to send the document (already converted to PDF) to a printer.  I have no idea where to start with this, though I am almost sure that it will involve building a custom printing service running on the host O/S (Windows Server 2012r2)...

Can anyone provide me ideas or at least a "where to look" reference? (I have no experience with building services)

Thanks
Web ServicesMicrosoft SharePointDocument ManagementWindows Server 2012

Avatar of undefined
Last Comment
g_currier

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rainer Jeschor

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
g_currier

ASKER
Right...sorry I forgot to include the "when" part... it would essentially be when the document (the PDF) is checked in to a document library.  I could use a scheduled Powershell task to read the library and then download the file and print it...does that sound about right? Is it necessary that the file sits in a folder first?
Rainer Jeschor

Hi,
yes, that sound right.
I am not sure if the PowerShell command can work with the WebDAV connected files and it might be hard to filter the files (I guess you do not want to print each and every file everytime) - therefore running a SharePoint query on the library returning only the necessary (affected) documents to a local folder and then running the print in a loop on the local files would be my suggested solution.

HTH
Rainer
Jamie McAllister

I'm with Rainer on this one, if you can get away with a batch process it'll be a nicer approach. You should architect it as detailed here;

http://the-north.com/sharepoint/post/Alternatives-to-SharePoint-Timer-Jobs

If it has to be real time then you probably need to code an event receiver, or workflow to handle the passing over to another unattended service for printing. (But seriously I'd keep the code off the SharePoint servers if at all possible. Your custom task could poll for new content every ten minutes rather than going for a full synchronous process?)

Windows Services tend to be overkill for this sort of thing. Task scheduler running a simple console app is usually a better approach, more robust and much less code.

Just a thought but to decouple this a little without using an event receiver or regular polling etc you could actually set up an alert on the library and send the alert emails to the print process you create (as the emails should contain the info you need to find the items that need printing).
Your help has saved me hundreds of hours of internet surfing.
fblack61
g_currier

ASKER
Thanks for the tip...I am implementing this and beginning my testing.  Now...to read the print queue...lol