My problem arises because of the following. I have a web application with Java back that creates and reads PDF files . When you create them, you attach 4 files " .txt " that contain additional data that should not be visible in the document, but that are necessary to be analyzed when sent. The PDFs must be protected against modifications and only allow the signature. This is achieved, the problem is that the attachments are not, they allow editing, which can cause failures when analyzing the data of them.
Any suggestions?
My idea is that when creating it in this function:
public PdfAttachment(final String fileName,
final String fileContent,
final String fileDescription) throws UnsupportedEncodingException {
this(
fileName != null && !fileName.isEmpty() ? fileName : "attachment.pdf", //$NON-NLS-1$
fileContent.getBytes(DEFAULT_ENCODING),
fileDescription
);
}
Add to it that it has the property of " read only " but as much as I've looked around having the keywords " PDF and Attachment / Attachment " everything that comes out is related to PDFs attached to mails and similar, being as close as I look for the management of those attachments (create, edit and delete) but nothing related to their protection.