question: public List < PdfDocument > extractPageRanges ( List < PageRange > pageRanges ) { List < PdfDocument > splitDocuments = new ArrayList < > ( ) ; for ( PageRange currentPageRange : pageRanges ) { PdfDocument currentPdfDocument = createPdfDocument ( currentPageRange ) ; splitDocuments . add ( currentPdfDocument ) ; pdfDocument . copyPagesTo ( currentPageRange . getAllPages ( ) , currentPdfDocument ) ; } return splitDocuments ; }
target:  Extracts the specified page ranges from a document.