Add below filter to your themes functions.php in order to set protection. You can even set passwords. Check here.
function bewpi_mpdf( $mpdf ) {
// Encrypt the file and grant no permissions to the user to copy, print etc.
// The user will be able to open the file as no password is specified
// Owner cannot access full rights because no owner_password was set
$mpdf->SetProtection(array());
return $mpdf;
}
add_filter( 'bewpi_mpdf', 'bewpi_mpdf' );
Let me know if I it works. Happy to help you out.
Would you be so kind to rate the plugin? It would support future development a lot! Many thanks in advance.