How to hide the buttons in the format print

How to hide or remove the button of PDF and Full Page, i am trying to do it with
setTimeout(() => {

        frm.remove_custom_button('Full Page');

        frm.remove_custom_button('PDF');

    }, 10);

Like in the documentation but notigh.

refresh: function(frm) {
$(‘.btn-print-preview’).addClass(“hide”);
$(‘.btn-download-pdf’).addClass(“hide”);
}

No i am trying but doesnt work, because de refresh is for the doctype but when i press the button of print that get me in the view of printing i think is a next place