Show / Hide Table of Contents

Class LinearizePDFJob

A job that converts a PDF file into a linearized (also known as "web optimized") PDF file. Such PDF files are optimized for incremental access in network environments.

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

    LinearizePDFJob linearizePDFJob = new LinearizePDFJob(asset);
    String location = pdfServices.Submit(linearizePDFJob);
    PDFServicesResponse<LinearizePDFResult> pdfServicesResponse =
        pdfServices.GetJobResult<LinearizePDFResult>(location, typeof(LinearizePDFResult));

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

Constructors

LinearizePDFJob(IAsset)

Constructs a new LinearizePDFJob instance.

Declaration
public LinearizePDFJob(IAsset asset)
Parameters
Type Name Description
IAsset asset

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

Methods

SetOutput(IAsset)

Sets the output asset for the job.

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

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

Returns
Type Description
LinearizePDFJob

LinearizePDFJob instance

Remarks

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

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