PDF Encryption and Password protection

Hi All,

We have pdf file which contains critical fileld like PAN card No, Bank account no in plain text. We need to make encrypt these field i.e. PAN should be look like XXXXXXXX9K instead plain text i.e. ABCDEFGW16 and same for bank account no.

After we have make PDF as password protected and sent to over mail. How we can acheive functionality.