Show / Hide Table of Contents

Class PDFElectronicSealJob

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.

Inheritance
System.Object
PDFServicesJob
PDFElectronicSealJob
Namespace: Adobe.PDFServicesSDK.pdfjobs.jobs
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class PDFElectronicSealJob : 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());

    String sealFieldName = "Signature1";
    FieldOptions fieldOptions = new FieldOptions.Builder(sealFieldName)
        .SetFieldLocation(new FieldLocation(150, 250, 350, 200))
        .SetPageNumber(1)
        .Build();

    CertificateCredentials certificateCredentials = CertificateCredentials.CSCCredentialBuilder()
        .WithProviderName("<PROVIDER_NAME>")
        .WithCredentialID("<CREDENTIAL_ID>")
        .WithPin("<PIN>")
        .WithCSCAuthContext(new CSCAuthContext("<ACCESS_TOKEN>"))
        .Build();

    PDFElectronicSealParams pdfElectronicSealParams =
        PDFElectronicSealParams.PDFElectronicSealParamsBuilder(certificateCredentials, fieldOptions)
        .Build();

    PDFElectronicSealJob pdfElectronicSealJob = new PDFElectronicSealJob(asset, pdfElectronicSealParams);
    String location = pdfServices.Submit(pdfElectronicSealJob);
    PDFServicesResponse<PDFElectronicSealResult> pdfServicesResponse =
        pdfServices.GetJobResult<PDFElectronicSealResult>(location, typeof(PDFElectronicSealResult));

    IAsset resultAsset = pdfServicesResponse.Result.Asset;
    StreamAsset streamAsset = pdfServices.GetContent(resultAsset);

Constructors

PDFElectronicSealJob(IAsset, PDFElectronicSealParams)

Constructs a new PDFElectronicSealJob instance.

Declaration
public PDFElectronicSealJob(IAsset inputDocumentAsset, PDFElectronicSealParams pdfElectronicSealParams)
Parameters
Type Name Description
IAsset inputDocumentAsset

The input IAsset for the job; can not be null.

PDFElectronicSealParams pdfElectronicSealParams

The input PDFElectronicSealParams object to specify the electronic seal parameters; can not be null.

Methods

SetOutput(IAsset)

Sets the output asset for the job.

Declaration
public PDFElectronicSealJob SetOutput(IAsset asset)
Parameters
Type Name Description
IAsset asset

IAsset object representing the output asset; can not be null.

Returns
Type Description
PDFElectronicSealJob

PDFElectronicSealJob instance

Remarks

External assets can be set as output only when input is external asset as well

SetSealImageAsset(IAsset)

Sets the seal image asset for the job.

Declaration
public PDFElectronicSealJob SetSealImageAsset(IAsset sealImageAsset)
Parameters
Type Name Description
IAsset sealImageAsset

IAsset object representing the seal image; can not be null.

Returns
Type Description
PDFElectronicSealJob

PDFElectronicSealJob instance

In This Article
  • Constructors
    • PDFElectronicSealJob(IAsset, PDFElectronicSealParams)
  • Methods
    • SetOutput(IAsset)
    • SetSealImageAsset(IAsset)
Back to top Copyright © 2020 Adobe. All rights reserved.