Link to home
Create AccountLog in
Avatar of g_currier
g_currierFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of 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?
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
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).
Thanks for the tip...I am implementing this and beginning my testing.  Now...to read the print queue...lol