How do I make PDF security compatible with older versions of Acrobat?

Q: We insert metadata like author, publisher, javascript, and
bookmarks in the PDF document. This works fine until we set security
options using SecurityHandler to protect the document.

In all Acrobat Versions smaller than 7 after setting the security
options the metadata, bookmarks and javascript isn’t available. How do
I adjust security so that it is compatible with older Acrobat

// The following is the C# code snippet that I currently use to apply
the security:
PDFDoc d = new PDFDoc(path);

// Add Docinfo
PDFDocInfo i = d.GetDocInfo();
i.SetAuthor("My Name");
i.SetCreationDate(new Date());
i.SetCreator("PDF Generator");

// Add Security
StdSecurityHandler s = new
s.SetPermission(SecurityHandler.Permission.e_doc_modify, false);
s.SetPermission(SecurityHandler.Permission.e_extract_content, false);
s.SetPermission(SecurityHandler.Permission.e_doc_open, true);
s.SetPermission(SecurityHandler.Permission.e_fill_forms, false);
s.SetPermission(SecurityHandler.Permission.e_mod_annot, false);
s.SetPermission(SecurityHandler.Permission.e_print, true);
s.SetPermission(SecurityHandler.Permission.e_print_high, true);
s.SetPermission(SecurityHandler.Permission.e_assemble_doc, false);

d.Save(PDFPfad, SDFDoc.SaveOptions.e_linearized);
A: If your PDF documents must be compatible with old Acrobat versions
you would need want to use a version of security handler that is
compatible with those versions. For example, use:

  StdSecurityHandler s = new

instead of

StdSecurityHandler s = new StdSecurityHandler();

The latter line creates e_RC4_128 by default, which was only supported
since Acrobat 7.

You can also create a specific version and revision of security
handler using other constructor variants:

StdSecurityHandler s = StdSecurityHandler (40, 1);