I am working on print functionality. I am printing the PDF files (uploaded in SharePoint Library) using Adobe Reader command line from javascript. I am using ActiveX object to call the cmd. refer below code I am using.
var wsh = new ActiveXObject('wscript.shell');
if (wsh) {
command = 'cmd /k ' + wsh.expandenvironmentstrings("start AcroRd32.exe /t " + char34 + "\\\\<server>@<port>\\DavWWWRoot\\<LibraryName>\\<FileName>.pdf" + char34");
wsh.run(command, 0)
}
- As soon as javascript is calling the "wsh.run(command, 0)" command, adobe Reader is trying to open the document. but as the document is in SharePoint document library so it is asking for "checkout/open","Open" or "cancel". If user will not select the "checkout/open","Open" then print process will not be started.
- Now I want a solution to open the document without that CheckOut popup. Because the requirement is "User can select multiple document at a time to print in bulk." so every time we can not force the user to open or checkout the document.
- And why user should select open or checkout because print is given not for opening.
- BTW, How can I skip the popup for silent printing?
- This problem is happening only with PDF files the other type of files are working fine (not asking for Checkout).
Please help. Thanks.