Using itext7 libraries, i am trying to create a read-only pdf with embedded attachments. I am not finding really good examples that show how to disable "save" and "save-as" buttons from the main file menu. Also, I would like to disable "add" and "save" attachments from attachment menu.
Any help/direction with this regard is highly appreciated.
Thanks SGK
iText is a library to generate pdf documents. It does not change what a pdf-viewer is capable of doing with the document. Your question about disabling "save" and "save as" is therefore completely out of context for iText.
That's the reason why you didn't find any documentation about it.
You can set a password on the document, which disables easy modification. But you'll never stop good old ctrl+c / ctrl+v.
You can add a digital signature to the PDF (you will find documentation about this). A digital signature will (from a bird's eye view):
This ensures that if someone modifies the document, other people will know. A program like Adobe will then display a warning stating that the signature is no longer valid (because the content, and thus the hash of the content) has changed.
Strictly speaking this does not prevent anyone from modifying your content, it just ensures a sufficiently adept reader of your document will notice that something is up.