To create and write an encrypted Pdf file using owner and user passwords you can first use the LoadDocument method with password parameter and then create and write the encrypted file. For more information on how to use the LoadDocument method seeLoading Documents from the Web.