TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Add Print Document as a selection for Custom Buttons
At times we need to update fields and take other actions and also print documents from a multi record selection. To aid in reducing administrative work load, it would be advantageous to also call the document print function as one of the actions to be handled by the custom button.
ID
1242
Category
Customization
Author

Jeff Aibel
Date Created
12/4/2018 2:43:34 PM
Date Updated
8/11/2022 7:33:58 PM
Status
Implemented
Score
60
Promoted By
Dale Oliverrusty_oliver@pacific-steel.comPhilipp Matuschka (MMB)
calvin petersPatricio BustosJeff Aibel
Comments
calvin peters 12/4/2018 2:59:19 PM
That sounds like a worthy idea.

The need to download .pdf before printing becomes a bit burdensome when dealing with a larger volume of documents. Repeatedly opening and closing documents to print individually can get old fast.

The ability to simply click to print .pdf document straight from a custom button would be a welcome update.
Kirill Bondar  Staff  6/18/2022 3:28:48 AM
Added an option "Send to Printer" to the Document -- available only for PDF format (and potentially for any file format browser can open without starting 3rd party program)
Kirill Bondar  Staff  6/18/2022 3:33:33 AM
Known issues:
* IE11 is not supported (it's out of Microsoft support from June 15, 2022 either)
* Printing on Android not supported (likely browser bug)
* On macOS printing will succeed for the first time, but if you cancel print dialog and click the button again, the browser will issue print warning and then empty PDF appears. It's a browser bug. Reloading the page before second attempt fixes the problem.

calvin peters 6/18/2022 7:20:51 AM
Thanks Kirill!

A very useful update.
Robert Gustavsson 7/1/2022 7:23:53 AM
Can this be implemented on attachment columns too (when they contain a PDF file)?
Kirill Bondar  Staff  7/2/2022 5:08:48 AM
@Robert - for attachments it looks more like edge case scenario -- off the wide set of document formats we can only print PDF.

But in fact **printing code runs on any link marked with "td-docprint" class**, so you can hack it with Formula - XHTML:

<a class="ui-button td-docprint" href="<%URLRoot() & "/attachment.aspx?fid=" & ColumnId([Attachment]) & "&id=" & RecordId()%>">Print</a>


Kirill Bondar  Staff  7/5/2022 6:18:21 AM
It's "officially released" now, with some bonus:
https://www.teamdesk.net/blog/whats-new/document-workflow-action/
Robert Gustavsson 7/5/2022 8:33:46 AM
Looks like a much cleaner (and safer) solution than the previous REST API workaround. The file name formula for documents however do not seem to function.
Slava Shinderov  Staff  7/5/2022 8:50:37 AM
@Robert please open a question and provide us an URL to the document action. So we'll be able to investigate the problem with file name formula.
basenine 8/11/2022 7:33:58 PM
It looks like the Safari issue has been resolved.
After canceling a print, then re-executing the request, a browser confirmation message appears which allows for, well, confirmation.
This means a refresh of the page is now unnecessary.
Feedback
 
Back to Search Results