Almost a little more than a decade ago it was not so easy to create PDF documents, and you had to invest in expensive software if you wanted to publish PDF documents. But then came the PDF virtual printers that made use of the Ghostscript and everybody could print any document into PDF files for free. I remember using virtual printers like CutePDF for a while to create PDF files through Microsoft Office. And now this feature is built inside all the major Office suites like Microsoft Office or LibreOffice.
In LibreOffice, you can export any document quickly to PDF by clicking on the PDF icon in the toolbar. But this does not give you any options for configuring the PDF files. If you want to generate password protected PDF files, then you have to use the menubar and select File → Export as PDF.
This will open a PDF Options window where you can configure various settings for generating the PDF. In the PDF options window, switch to the Security tab and click on the Set Passwords button. Before encrypting the PDF files, you have to set the passwords for opening it or accessing the permissions for printing or modifying the file. If you leave the password for opening PDF blank, then it won’t be set.
Once the permission password is set, you can change the various permissions like whether printing is allowed, whether modifying the PDF document is allowed, whether copying the text is allowed and so on. After this, you can click on the Export button and save the PDF file somewhere in your PC.
Summary: LibreOffice can be used to create password protected or permissions restricted PDF documents. The generated PDF files are compatible with all the PDF viewers on all the devices across various operating systems.