Drag and Drop and PDF/src/xyz/pabloblanco/business/write/impl/PDFWriter.java
/**
	 * Save the pdf pages on the specified path
	 * @param pdf pages
	 * @throws IOException 
	 */
Save the pdf pages on the specified path
@param pdf pages
@throws IOException
Save the pdf pages on the specified path @param pdf pages @throws IOException
private void savePages(List<PDDocument> pages,String path) throws IOException{
		File folder = new File(path);
		folder.mkdir();
		for (int i = 0; i < pages.size(); i++) {
			PDDocument doc = pages.get(i);
			String pagePath = folder.getAbsolutePath() +System.getProperty("file.separator") + i + ".pdf";
			doc.save(pagePath);
			doc.close();
		}
	}
private void savePages ( List < PDDocument > pages , String path ) throws IOException { File folder = new File ( path ) ; folder . mkdir ( ) ; for ( int i = 0 ; i < pages . size ( ) ; i ++ ) { PDDocument doc = pages . get ( i ) ; String pagePath = folder . getAbsolutePath ( ) + System . getProperty ( "file.separator" ) + i + ".pdf" ; doc . save ( pagePath ) ; doc . close ( ) ; } }
Save the pdf pages on the specified path
 @param pdf pages
 @throws IOException
Save the pdf pages on the specified path @param pdf pages @throws IOException