All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.pdfservices.operation.internal.util.AssetUploadUtil Maven / Gradle / Ivy

Go to download

Adobe PDF Services SDK allows you to access RESTful APIs to create, convert, and manipulate PDFs within your applications. Older versions can be found under groupId: com.adobe.documentservices, artifactId: pdftools-sdk

There is a newer version: 4.2.0
Show newest version
package com.adobe.pdfservices.operation.internal.util;

import com.adobe.pdfservices.operation.exception.ServiceApiException;
import com.adobe.pdfservices.operation.internal.ExecutionContext;
import com.adobe.pdfservices.operation.internal.PDFServicesHelper;
import com.adobe.pdfservices.operation.io.Asset;
import com.adobe.pdfservices.operation.io.StreamAsset;

import java.io.IOException;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;

public class AssetUploadUtil implements Callable {


    ExecutionContext context;

    StreamAsset streamAsset;

    public AssetUploadUtil(ExecutionContext context, StreamAsset streamAsset) {
        this.context = context;
        this.streamAsset = streamAsset;
    }

    @Override
    public Asset call() throws IOException, ServiceApiException, ExecutionException {
        return PDFServicesHelper.upload(this.context, streamAsset.getInputStream(), streamAsset.getMimeType());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy