Class 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(
                 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 Detail

      • LinearizePDFJob

        public LinearizePDFJob​(Asset asset)
        Constructs a new LinearizePDFJob instance.
        asset - Asset object containing the input file; can not be null.
    • 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
        asset - Asset object representing the output asset; can not be null.
        LinearizePDFJob instance