Class RemoveProtectionJob
A job that allows to remove password security from a PDF document.
Namespace: Adobe.PDFServicesSDK.pdfjobs.jobs
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class RemoveProtectionJob : PDFServicesJob
Examples
Sample Usage:
using Stream inputStream = File.OpenRead("<SOURCE_PATH>");
ICredentials credentials = new ServicePrincipalCredentials(
Environment.GetEnvironmentVariable("PDF_SERVICES_CLIENT_ID"),
Environment.GetEnvironmentVariable("PDF_SERVICES_CLIENT_SECRET"));
PDFServices pdfServices = new PDFServices(credentials);
IAsset asset = pdfServices.Upload(inputStream, PDFServicesMediaType.PDF.GetMIMETypeValue());
RemoveProtectionParams removeProtectionParams = new RemoveProtectionParams("password");
RemoveProtectionJob removeProtectionJob = new RemoveProtectionJob(asset, removeProtectionParams);
String location = pdfServices.Submit(removeProtectionJob);
PDFServicesResponse<RemoveProtectionResult> pdfServicesResponse =
pdfServices.GetJobResult<RemoveProtectionResult>(location, typeof(RemoveProtectionResult));
IAsset resultAsset = pdfServicesResponse.Result.Asset;
StreamAsset streamAsset = pdfServices.GetContent(resultAsset);
Constructors
RemoveProtectionJob(IAsset, RemoveProtectionParams)
Constructs a new RemoveProtectionJob
instance.
Declaration
public RemoveProtectionJob(IAsset asset, RemoveProtectionParams removeProtectionParams)
Parameters
Type | Name | Description |
---|---|---|
IAsset | asset | The input IAsset for the job; can not be null. |
Remove |
removeProtectionParams | The input Remove |
Methods
SetOutput(IAsset)
Sets the output asset for the job.
Declaration
public RemoveProtectionJob SetOutput(IAsset asset)
Parameters
Returns
Type | Description |
---|---|
Remove |
|
Remarks
External assets can be set as output only when input is external asset as well