Class PDFElectronicSealJob
- java.lang.Object
-
- com.adobe.pdfservices.operation.PDFServicesJob
-
- com.adobe.pdfservices.operation.pdfjobs.jobs.PDFElectronicSealJob
-
public class PDFElectronicSealJob extends PDFServicesJob
A job that allows clients to apply an electronic seal onto various PDF documents such as agreements, invoices, and more.To know more about PDF Electronic Seal, please see the documentation.
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); CertificateCredentials certificateCredentials = CertificateCredentials.cscCredentialBuilder() .withProviderName("<PROVIDER_NAME>") .withCredentialID("<CREDENTIAL_ID>") .withPin("<PIN>") .withCSCAuthContext(new CSCAuthContext("<ACCESS_TOKEN>")) .build(); String sealFieldName = "Signature1"; FieldOptions fieldOptions = new FieldOptions.Builder(sealFieldName) .setFieldLocation(new FieldLocation(150, 250, 350, 200)) .setPageNumber(1) .build(); PDFElectronicSealParams pdfElectronicSealParams = PDFElectronicSealParams.pdfElectronicSealParamsBuilder(certificateCredentials, fieldOptions).build(); PDFElectronicSealJob pdfElectronicSealJob = new PDFElectronicSealJob(asset, pdfElectronicSealParams); String location = pdfServices.submit(pdfElectronicSealJob); PDFServicesResponse<PDFElectronicSealResult> pdfServicesResponse = pdfServices.getJobResult(location, PDFElectronicSealResult.class); Asset resultAsset = pdfServicesResponse.getResult().getAsset(); StreamAsset streamAsset = pdfServices.getContent(esealResult);
-
-
Constructor Summary
Constructors Constructor Description PDFElectronicSealJob(Asset inputDocumentAsset, PDFElectronicSealParams pdfElectronicSealParams)
Constructs a newPDFElectronicSealJob
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setSealImageAsset(Asset sealImageAsset)
Sets the seal image asset for the job.
-
-
-
Constructor Detail
-
PDFElectronicSealJob
public PDFElectronicSealJob(Asset inputDocumentAsset, PDFElectronicSealParams pdfElectronicSealParams)
Constructs a newPDFElectronicSealJob
instance.- Parameters:
inputDocumentAsset
-Asset
object containing the input file; can not be null.pdfElectronicSealParams
-PDFElectronicSealParams
object containing the parameters for electronic seal; can not be null.
-
-