Show / Hide Table of Contents

Class ExportPDFToImagesJob

A job which exports a source PDF file to a supported format specified by ExportPDFToImagesTargetFormat.

The result is a list of images or a list containing a zip of images. For example, a PDF file with 15 pages will generate 15 image files. The first file's name ends with "_0" and the last file's name ends with "_14".

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

    ExportPDFToImagesParams exportPDFToImagesParams = ExportPDFToImagesParams
        .ExportPDFToImagesParamsBuilder(ExportPDFToImagesTargetFormat.JPEG,
            ExportPDFToImagesOutputType.LIST_OF_PAGE_IMAGES)
        .Build();
    ExportPDFToImagesJob exportPDFToImagesJob = new ExportPDFToImagesJob(asset, exportPDFToImagesParams);
    String location = pdfServices.Submit(exportPDFToImagesJob);
    PDFServicesResponse<ExportPDFToImagesResult> pdfServicesResponse =
        pdfServices.GetJobResult<ExportPDFToImagesResult>(location, typeof(ExportPDFToImagesResult));

    List<IAsset> resultAssets = pdfServicesResponse.Result.Assets;
    foreach (IAsset resultAsset in resultAssets)
    {
        StreamAsset streamAsset = pdfServices.GetContent(resultAsset);
    }

Constructors

ExportPDFToImagesJob(IAsset, ExportPDFToImagesParams)

Constructs a new ExportPDFToImagesJob instance.

Declaration
public ExportPDFToImagesJob(IAsset asset, ExportPDFToImagesParams exportPDFToImagesParams)
Parameters
Type Name Description
IAsset asset

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

ExportPDFToImagesParams exportPDFToImagesParams

ExportPDFToImagesParams object containing the export parameters; can not be null.

Methods

SetOutput(IAsset)

Sets the output asset for the job.

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

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

Returns
Type Description
ExportPDFToImagesJob

ExportPDFToImagesJob instance

Remarks

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

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