DirectPDF (Ubuntu snap) converts images to PDF with OCR. The resulting PDF file can be password protected (RC4, AESv2 or AESv3) and restricted by permissions.
Detailed information about usage can be retrieved by invocation of manual page (man directpdf). Here you can find examples how to use directpdf for conversion images to PDF, how to apply encryption and restrictions on converted PDF file.
DirectPDF is distributed as a snap package via the Ubuntu store, also deb package is available.