How to add security to a PDF file using LibreOffice?

Solution 1:

If you're looking for setting security within the PDF itself, LibreOffice can do so. Use the Export as PDF option from the File menu. The resulting dialog has a tab named 'Security`: 'Export as PDF' dilalog box

For command line conversion, the man page suggest that convert can use the options set in the Writer's Export as PDF dialog. So I suppose you could set it once in an instance of Writer, close it, and then use the --convert-to pdf:writer_pdf_Export option. I think similar filters may be available for Draw and others as well, but I'm not sure. See http://ask.libreoffice.org/en/question/2641/convert-to-command-line-parameter/?answer=6292#post-id-6292 for more information on how to look up filters.