Class PDFPropertiesJob
A job that is used to fetch properties from an input PDF file. The properties are returned in a POJO.
Namespace: Adobe.PDFServicesSDK.pdfjobs.jobs
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class PDFPropertiesJob : 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());
PDFPropertiesParams pdfPropertiesParams = PDFPropertiesParams.PDFPropertiesParamsBuilder()
.IncludePageLevelProperties()
.Build();
PDFPropertiesJob pdfPropertiesJob = new PDFPropertiesJob(asset)
.SetParams(pdfPropertiesParams);
String location = pdfServices.Submit(pdfPropertiesJob);
PDFServicesResponse<PDFPropertiesResult> pdfServicesResponse =
pdfServices.GetJobResult<PDFPropertiesResult>(location, typeof(PDFPropertiesResult));
PDFProperties pdfProperties = pdfServicesResponse.getResult().getPdfProperties();
Constructors
PDFPropertiesJob(IAsset)
Constructs a new PDFPropertiesJob
instance.
Declaration
public PDFPropertiesJob(IAsset asset)
Parameters
Methods
SetParams(PDFPropertiesParams)
Sets the parameters for the job.
Declaration
public PDFPropertiesJob SetParams(PDFPropertiesParams pdfPropertiesParams)
Parameters
Type | Name | Description |
---|---|---|
PDFProperties |
pdfPropertiesParams | PDFProperties |
Returns
Type | Description |
---|---|
PDFProperties |
|