You are viewing limited content. For full access, please sign in.

Question

Question

Printing PDF's from Web Access

asked on June 28, 2018

Hi All,

 

When printing PDF's from Web Access, this is a 6 click operation compared to only 3 in the full client. This is a very time consuming process for the users using web access.

 

Is there anything that can be done to shorten this effort to match the full client?

 

Cheers!

0 0

Answer

SELECTED ANSWER
replied on July 2, 2018

Hi Chris, 

 

Thanks for the feedback. 6 clicks to print does seem like something we can improve on. I'll pass this on to our User Experience team to see if they can smooth out the behavior. 

 

Ryan

0 0
replied on July 3, 2018 Show version history

Thanks Ryan!

0 0
replied on December 2, 2019

Hello, is there any update on this? Thanks !

0 0
replied on November 9, 2020

Hi Ryan-

Any updates on this request? I have a user that's upset about the number of clicks required to get things printed.

0 0
replied on November 10, 2020

There have been some changes to streamline the process since this post was made. The current version is available on the cloud now, and will be included in the upcoming 11.0 release for self-hosted customers.

I'm not sure what exact scenario required 6 clicks at the time - if that was normal or exceptional - but the normal flow takes 3 clicks now.

0 0
replied on November 11, 2020

Thanks, Brian. I think the actual printing is more like 4 clicks: the button in the doc viewer, print in the dialog asking for pages, print button the PDF display, and then print again after opening the real dialog to select a printer.

I found that PrintPdfViewer.html has a little script at the bottom to automatically launch the print dialog but it was commented out. Removing the comment tags removes one click.

I'm working with Sam to see if I can make a custom action to quick print: automatically select all pages for the generated PDF and bypass that first dialog.

0 0
replied on November 13, 2020 Show version history

Hey Pieter,

One of my colleagues @████████took a shot at this (thanks Salah!) and wrote a custom action script to automate the first two clicks.

var trackTimer;
var trackCounter;
if ($('button[aria-label="Print"]').length) {
    setTimeout(function() {
      $('button[aria-label="Print"]').click();
      trackTimer = setInterval(function() {
         trackCounter++;
         if ($('.PrintDocumentController').length) {
                clearInterval(trackTimer);
                $('.PrintDocumentController').find('button.btn-primary').click();
         }
         
         if (trackCounter>30) {
             // after 30 seconds, timeout
             clearInterval(trackTimer);
             alert('Printing did not work! Printing might have been disabled');          
         }
      }, 1000);
    }, 500);
} else {
  alert('Printing is not possible!');
}

Label the custom action something like "Direct Print" and give it a spin =)

1 0
replied on November 16, 2020

Thanks, Sam. This is great! One issue: it's opening 2 tabs with the generated PDF to print.

0 0
replied on November 23, 2020

@████████ Do you mean the 2 tabs for the Document Viewer and The generated PDF?

If that's so, you can use a timed window.close() on both pages or one of them.

So if you have modified the PrintPDFViewer.html you can add window.close() after the window.print();  printing dialog script.

That will close the generated pdf page after printing dialog is finished.

You can also modify the custom script if you want the Document Viewer window to be close as well:

var trackTimer;
var trackCounter;
if ($('button[aria-label="Print"]').length) {
    setTimeout(function() {
      $('button[aria-label="Print"]').click();
      trackTimer = setInterval(function() {
         trackCounter++;
         if ($('.PrintDocumentController').length) {
                clearInterval(trackTimer);
                $('.PrintDocumentController').find('button.btn-primary').click();
                setTimeout(function() {
                      window.close();
                }, 3000); // 3 seconds -- Adjust timing if needed
         }
         
         if (trackCounter>30) {
             // after 30 seconds, timeout
             clearInterval(trackTimer);
             alert('Printing did not work! Printing might have been disabled');          
         }
      }, 1000);
    }, 500);
} else {
  alert('Printing is not possible!');
}

 

One note is to be careful with automatically closing tabs, that would annoy some users. 

1 0
replied on December 1, 2020

Hi Sala-

Finally getting back to this. The issue is that the code pops open two copies of PrintPdfViewer.html, which you can sort of see in this screenshot.

If I change the code that does the actual click to hone in on the footer div, instead of the broad PrintDocumentController, like below, it only opens one tab for printing. However, the print modal remains open on the document where the original code you provided does trigger that modal to close.

$('#footerDiv').find('button.btn-primary').click();

0 0
replied on December 16, 2020

I think I finally sorted this out. Launching printing by scripting the press of the print button actually triggers twice, because there is a second copy of that print button somewhere else on the page (can't tell exactly where, but my guess is it has to do with rearranging things for a responsive design?).

Finally overcame the double-printing issue by figuring out how to target the print button just in the top part as

div.DocViewMainToolbarContainer button[aria-label="Print"]

I also was able to genericize it to work whether the button was there or hidden in the menu by doing the check and click with this, though I haven't fully finished testing yet.

div.DocViewMainToolbarContainer [aria-label="Print"]

1 0

Replies

replied on June 28, 2018 Show version history

I'm curious what your steps are for exporting a PDF? When I do it in the web client, it only takes three clicks. I might be misunderstanding your explanation.

0 0
replied on June 29, 2018

Hi Devin, this is when printing, not exporting. Cheers!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.