How to hide HTML buttons from a pdf

How to hide HTML buttons from a pdf

Dear All,

If I add in a HTML page two buttons like

  1. <button type="button" id="B2" onclick="alert('Hello world!')">Accept</button>
  2. <button type="button" id="B3" onclick="alert('Hello world!')">Reject</button>

Furthermore, the Print - PDF buttons have enabled.. I know that with the 

  1. @media print
  2. {
  3.       #B3,#B2 {
  4.       display: none;
  5.       }
  6. }
I can hide the two buttons. But how can I hide them in the PDF button?