Class LinearizePDFJob
- java.lang.Object
-
- com.adobe.pdfservices.operation.PDFServicesJob
-
- com.adobe.pdfservices.operation.pdfjobs.jobs.LinearizePDFJob
-
public class LinearizePDFJob extends PDFServicesJob
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.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); Asset asset = pdfServices.upload(inputStream, PDFServicesMediaType.PDF.getMediaType()); LinearizePDFJob linearizePDFJob = new LinearizePDFJob(asset); String location = pdfServices.submit(linearizePDFJob); PDFServicesResponse<LinearizePDFResult> pdfServicesResponse = pdfServices.getJobResult(location, LinearizePDFResult.class); Asset resultAsset = pdfServicesResponse.getResult().getAsset(); StreamAsset StreamAsset = pdfServices.getContent(linearizeAssetResult);
-
-
Constructor Summary
Constructors Constructor Description LinearizePDFJob(Asset asset)
Constructs a newLinearizePDFJob
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinearizePDFJob
setOutput(Asset asset)
Sets the output asset for the job.
-
-
-
Method Detail
-
setOutput
public LinearizePDFJob setOutput(Asset asset)
Sets the output asset for the job.@note
External assets can be set as output only when input is external asset as well- Parameters:
asset
-Asset
object representing the output asset; can not be null.- Returns:
LinearizePDFJob
instance
-
-