alidaonline
Member
Posted 1 year ago #
Hi there
I've installed this plugin and it works great although I would like to have a situation where a user clicks on the link to print to PDF and when the new tab opens the print dialog is automatically opened.
I know you can't close the tab once the print dialog is closed but I would like to hide the toolbar so that users can't save the PDF.
Could you point me in the right direction?
fkrauthan
Member
Posted 1 year ago #
There is no option. And there is always a way to save the pdf file. So if you would only a print of your pdf you should use another plugin. wp-print for exmaple.
alidaonline
Member
Posted 1 year ago #
I found a way to remove the toolbar by adding the following code to the config.php file in the mpdf folder:
$this->SetDisplayPreferences('/HideMenubar/HideToolbar/DisplayDocTitle');
I know that the user can still click on File - Save As but the intention is just to discourage the average user from saving the file.
I've found some code here http://www.fpdf.org/en/script/script36.php that just needed a modification to refer to the mpdf class which automatically opens the print dialog.