Example usage for com.itextpdf.text.pdf.codec GifImage GifImage

List of usage examples for com.itextpdf.text.pdf.codec GifImage GifImage

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf.codec GifImage GifImage.

Prototype

public GifImage(InputStream is) throws IOException 

Source Link

Document

Reads gif images from a stream.

Usage

From source file:com.pdf.GetPdf.java

public static void addGif(Document document, String path) throws IOException, DocumentException {
    GifImage img = new GifImage(path);
    int n = img.getFrameCount();
    for (int i = 1; i <= n; i++) {
        document.add(img.getImage(i));/*from  w w  w . ja  va 2  s  . c o m*/
    }
}