hidden pdf button in print format

how to hidden pdf button in pdf

Please share the screenshot. If it is possible you will get the answer.

Not possible, you have to remove the PDF option from the core print file and it also removes from the whole erpnext.

I guess we can hide this button via client script,
Correct me If im wrong.

Thank You

However, it sometimes works and sometimes doesn’t, but when reloading the print page then it does not works.

frappe.ui.form.on('Sales Invoice', {
    refresh: function(frm) {
        $(document).ready(function() {

Thank you