Class PDFPropertiesJob
- java.lang.Object
-
- com.adobe.pdfservices.operation.PDFServicesJob
-
- com.adobe.pdfservices.operation.pdfjobs.jobs.PDFPropertiesJob
-
public class PDFPropertiesJob extends PDFServicesJob
A job that is used to fetch properties from an input PDF file. The properties are returned in a POJO.Sample Usage:
InputStream inputStream = new FileInputStream(new File("SOURCE_PATH")); Credentials credentials = new ServicePrincipalCredentials( System.getenv("PDF_SERVICES_CLIENT_ID"), System.getenv("PDF_SERVICES_CLIENT_SECRET")); PDFServices pdfServices = new PDFServices(credentials); Asset asset = pdfServices.upload(inputStream, PDFServicesMediaType.PDF.getMediaType()); PDFPropertiesParams pdfPropertiesParams = PDFPropertiesParams.pdfPropertiesParamsBuilder() .includePageLevelProperties() .build(); PDFPropertiesJob pdfPropertiesJob = new PDFPropertiesJob(asset) .setParams(pdfPropertiesParams); String location = pdfServices.submit(pdfPropertiesJob); PDFServicesResponse<PDFPropertiesResult> pdfServicesResponse = pdfServices.getJobResult(location, PDFPropertiesResult.class); PDFProperties pdfProperties = pdfServicesResponse.getResult().getPdfProperties();
-
-
Constructor Summary
Constructors Constructor Description PDFPropertiesJob(Asset asset)
Constructs a newPDFPropertiesJob
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDFPropertiesJob
setParams(PDFPropertiesParams pdfPropertiesParams)
Set params for the job.
-
-
-
Method Detail
-
setParams
public PDFPropertiesJob setParams(PDFPropertiesParams pdfPropertiesParams)
Set params for the job.- Parameters:
pdfPropertiesParams
-PDFPropertiesParams
object containing the properties to be fetched; can not be null.- Returns:
PDFPropertiesJob
instance
-
-