0

I would like to know if there is a quick way of printing bulk of documents from a sharepoint document library. I know that there is a way to print atmost 15 files from "open Windows Explorer" -> select all the documents -> right click and click print. But my committee members need a solid button that does that features. Is this impossible??

1

This PowerShell iterates through a library (folders included), downloads a local copy, then prints to the default printer on the machine it is executed on.

Swap $destination, $webURL and $listUrl parameters as needed.

######################## Start Variables ########################
$destination = "C:\\"
$webUrl = "https://sharepoint/sites/sitename/"
$listUrl = "https://sharepoint/sites/sitename/Shared%20Documents/"
##############################################################
$web = Get-SPWeb -Identity $webUrl
$list = $web.GetList($listUrl)

function ProcessFolder {
    param($folderUrl)
    $folder = $web.GetFolder($folderUrl)
    foreach ($file in $folder.Files) {
        #Ensure destination directory
        $destinationfolder = $destination + "/" + $folder.Url 
        if (!(Test-Path -path $destinationfolder))
        {
            $dest = New-Item $destinationfolder -type directory 
        }
        #Download file
        $binary = $file.OpenBinary()
        $stream = New-Object System.IO.FileStream($destinationfolder + "/" + $file.Name), Create
        $writer = New-Object System.IO.BinaryWriter($stream)
        $writer.write($binary)
        $writer.Close()
        Start-Process -FilePath ($destinationfolder + "/" + $file.Name) -Verb Print
        }
}

#Download root files
ProcessFolder($list.RootFolder.Url)
#Download files in folders
foreach ($folder in $list.Folders) {
    ProcessFolder($folder.Url)
}

Source: http://yalla.itgroove.net/2013/03/print-all-documents-in-sharepoint-library-powershell/

  • 1
    This would require permissions to run PowerShell on the server and special permissions on the SQL database. End users typically don't have that kind of access. – teylyn Jun 25 '14 at 21:45
  • 1
    Their are ways to deal it, I.e make a schedule task and call it from sharepoint or other console application. – Waqas Sarwar MVP Jun 25 '14 at 23:38
0

Custom Sharepoint Solution can be created to achieve that. User can click the documents(pdf) they want to print using checkbox than you can try to merge all of that documents into a master pdf file and print it.

Another Idea Would be opening your document library in Windows explorer mode and If you highlight a group of Word.docs only, or a group of Excel.xls docs only, you DO get a Print option that lets you group-print them.

  • The OP is aware of the Windows Explorer option -- and the limitation to 15 documents only. Please read the question. – teylyn Jun 25 '14 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.