Hi there,
is there a way to hide the Print to PDF Button in the Ribbon?
Hi there,
is there a way to hide the Print to PDF Button in the Ribbon?
I apologize that I haven't checked myself yet, but I know in O365 there is a disable option in the form settings. Do you see that on prem?
Unfortunately onPrem the enable/disable option is missing
The custom CSS link I gave you above will do the job here. You'll need to use the dev tools of your browser to identify the Print to PDF CSS class.
I agree with Ryan, I'd just use some CSS or JS to hide the button as needed. With some additional logic you could make the PDF button hide and show as needed depending on variables as required.
Hi , if one of these posts gives you the correct answer, could you please mark it as such to help other members.
Thanks all for the replies. My first tries didn't work in our Scenario but I will give it another a try and come back to this discussion with more Details.
The CSS solution doesn't work for us as I'm finding that the ID changes every time the form loads...
1st - Nintex.Forms.SharePoint.Ribbon.FillerGroup.ca3dacb75ac5462f9be8a6e58e19377f
2nd - Nintex.Forms.SharePoint.Ribbon.FillerGroup.acd997ca69114adfadc1465498e9664a
Is anyone else having this issue?
Hi Sean,
I cannot confirm this issue. I tested it for the cancel button in preview and in published version, the id of the button always remains the same (even after re-publishing the form). Which control did you try to hide?
We're trying to hide the Print to PDF button.
Here's the first time I load it
and the next time I load it...
The ID for the PDF button is totally different when the form loads....
214b8e209a1b... vs 5b9fa47899...
Hi Sean,
I can confirm this behaviour, the ID of the print to pdf button changes everytime.
However, as a workaround you can use this css:
.ms-cui-tabContainer ul li:nth-child(5){
visibility: hidden !important;
}
Where "5" is the number of the li-element containing your print to pdf button. Doesn't work on preview mode for me, but works after publishing.
Regards
Philipp
Sorry, but I found an issue with this... it works when the form is in Edit mode but the Print PDF button still appears in View mode. Weird. Everything looks the same...
Let me have a look on this tomorrow, no access to my VM at the moment.
Allright, it doesn't work on view mode because in view mode it is the 3rd child. To work around this we will need some JS/JQuery.
To find out in which mode your form is:
Then you can use the CSS I provided for the new/edit mode and change the 5 to a 3 in the display mode section.
This works for me, but it also removes it from the back end when I use it in a Rich Text widget. I am using the responsive forms and I dont have direct access to the CSS or the formatting rules.
Hi @burnsmh,
Try the following custom JS solution instead of CSS.
NWF$(document).ready(function(){
var print2pdfid = document.querySelector('[id^="Nintex.Forms.Print.Ribbon.Print"]').parentNode.parentNode.id;
var print2pdf = document.getElementById(print2pdfid.substring(0, print2pdfid.indexOf("-")));
print2pdf.style.display = 'none';
});
@shaneoss Works for me, thanks
I tried to use the below code and it worked for me. But the problem is it will be hidden in both view and edit mode.
NWF$("#RibbonPrintToPDFButton").hide();
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.