oCrypto = NEWOBJECT("_cryptapi",HOME() + "ffc\_crypt.vcx") cEncryptedStream=SPACE(255) oCrypto.EncryptSessionStreamString(cEncryptedString, cPassWord, @cEncryptedStream) * now cEncryptedStream has your encrypted string.If what you are looking for is to encrypt a whole pdf file, then you could use something like this:
oCrypto = NEWOBJECT("_cryptapi",HOME() + "ffc\_crypt.vcx") oCrypto.encryptsessionstreamfile("temp\test.pdf",cPassWord,"test.pdf.enc") * now you have a resulting, encrypted file (original is left untouched) * this will reverse it: oCrypto.decryptsessionstreamfile("test.pdf.enc",cPassWord,"test.pdf")HTH