on 05-25-2015 7:52 AM
Hi there, I am using VS2013 with the CR for VS. My application exports invoices to PDF and then email it to customers. I would like to add security to the PDF files by adding a password to the PDF file. See below my code to create the PDF file. What is the best way to add the security? Thank you!!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cryRpt.Load("MyReport.rpt"); cryRpt.DataSourceConnections[0].SetConnection("", MainForm.jMainDB, false); cryRpt.RecordSelectionFormula = MySQL; cryRpt.SetParameterValue("rLogo", ncLogo); cryRpt.SetParameterValue("rTitle", lTitle); cryRpt.ExportToDisk(ExportFormatType.PortableDocFormat, lFN); cryRpt.Dispose(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Japie,
In my opinion, CR .NET SDK does not have control / handle over PDF but Crystal only.
So with CR SDK there are no APis to put a password for PDFs.
Possibly, you could write custom code using Adobe SDK to add password to exported PDF file ( if its possible, check with Adobe SDK forum) and call this code right after you export the report to pdf.
Thanks,
Bhushan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.