Class ExportPDFToImagesJob
A job which exports a source PDF file to a supported format specified by
Export
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".
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. |
Export |
exportPDFToImagesParams | Export |
Methods
SetOutput(IAsset)
Sets the output asset for the job.
Declaration
public ExportPDFToImagesJob SetOutput(IAsset asset)
Parameters
Returns
Type | Description |
---|---|
Export |
|
Remarks
External assets can be set as output only when input is external asset as well