PdfSaveOptionsEncryptionDetails Property

Gets or sets a encryption details. If not set, then no encryption will be performed.

Namespace:  Aspose.Tasks.Saving
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 20.5
Syntax
public PdfEncryptionDetails EncryptionDetails { get; set; }

Property Value

Type: PdfEncryptionDetails
Examples
Shows how to set a encryption details of PDF document. If not set, then no encryption will be performed.
var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");

var encryptionDetails = new PdfEncryptionDetails("userPassword", "ownerPassword", PdfEncryptionAlgorithm.RC4_128);

var options = new PdfSaveOptions();

// set a encryption details of PDF document
options.EncryptionDetails = encryptionDetails;

// tune additional properties
// set the <see cref="P:Aspose.Tasks.Saving.SaveOptions.PresentationFormat" /> in which the document will be saved.
options.PresentationFormat = PresentationFormat.GanttChart;

// set a desired conformance level for generated PDF document
options.Compliance = PdfCompliance.PdfA1b;

project.Save(OutDir + "WorkWithEncryptionDetails_out.pdf", options);
See Also