public List<PdfDocument> splitByOutlines(List<String> outlineTitles){
  if (outlineTitles == null || outlineTitles.size() == 0) {
    return Collections.<PdfDocument>emptyList();
  }
  List<PdfDocument> documentList=new ArrayList<>(outlineTitles.size());
  for (  String title : outlineTitles) {
    PdfDocument document=splitByOutline(title);
    if (document != null) {
      documentList.add(document);
    }
  }
  return documentList;
}

public List < PdfDocument > splitByOutlines ( List < String > outlineTitles ) { if ( outlineTitles == null || outlineTitles . size ( ) == 0 ) { return Collections . < PdfDocument > emptyList ( ) ; } List < PdfDocument > documentList = new ArrayList < > ( outlineTitles . size ( ) ) ; for ( String title : outlineTitles ) { PdfDocument document = splitByOutline ( title ) ; if ( document != null ) { documentList . add ( document ) ; } } return documentList ; }
split a document by outline title ( bookmark name ) , find outline by name and places the entire hierarchy in a separate document ( outlines and pages ) .
