public PdfImportedPage getImportedPage ( PdfReader reader , int pageNumber ) { if ( currentPdfReaderInstance != null ) { if ( currentPdfReaderInstance . getReader ( ) != reader ) { try { currentPdfReaderInstance . getReader ( ) . close ( ) ; currentPdfReaderInstance . getReaderFile ( ) . close ( ) ; } catch ( IOException ioe ) { // empty on purpose } currentPdfReaderInstance = reader . getPdfReaderInstance ( this ) ; } } else { currentPdfReaderInstance = reader . getPdfReaderInstance ( this ) ; } return currentPdfReaderInstance . getImportedPage ( pageNumber ) ; }
Grabs a page from the input document