16 July 2012

Recently I have learned that I can use iText to determine the number of pages from a single or multi page TIFF document. Here is how it works.

private byte[] pdfContent;

int numberOfPages = TiffImage.getNumberOfPages(new RandomAccessFileOrArray(pdfContent));

Isn’t it simple?


Tags: itext, tiff, java