7374757677787980818283
if( document.getNumberOfPages() <= 1 ) { throw new IOException( "Error: A PDF document must have at least one page, " + "cannot remove the last page!"); } document.removePage( 0 ); document.save( args[1] ); } finally { if( document != null )