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

com.giraone.imaging.pdf.PdfProvider Maven / Gradle / Ivy

Go to download

Utility JAR for imaging routines, e.g. thumbnail creation for PDF and bitmaps

There is a newer version: 1.2.0
Show newest version
package com.giraone.imaging.pdf;

import com.giraone.imaging.ConversionCommand;

import java.io.File;
import java.io.OutputStream;

/**
 * Interface for imaging operation on PDFs.
 */
public interface PdfProvider {
    /**
     * Create a thumbnail image for a given PDF file.
     *
     * @param inputFile     Input file.
     * @param outputStream  OutputStream, to which the thumbnail is written. Important: Stream is not closed!
     * @param format        Output file format given as a MIME type.
     * @param width         Width in pixel.
     * @param height        Height in pixel.
     * @param quality       Quality factor for output compression.
     * @param speedHint     Speed factor for conversion.
     */

    void createThumbNail(File inputFile, OutputStream outputStream,
                         String format, int width, int height,
                         ConversionCommand.CompressionQuality quality,
                         ConversionCommand.SpeedHint speedHint) throws Exception;

    PdfDocumentInformation getDocumentInformation(File pdfFile) throws Exception;

    int countPages(File pdfFile) throws Exception;

    void createPdfFromImages(File[] imageFiles, PdfDocumentInformation documentInformation, File outputPdfFile) throws Exception;

    void createPdfFromImages(byte[][] imageFileByteArrays, PdfDocumentInformation documentInformation,
                             int width, int height, OutputStream outputStream) throws Exception;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy