How to download PDDocument for example, PDDocument has has 10 pages with document name as Test and now this has to downloaded as zip file inside should PDF doc as Test1, Test2... Test10 in a zip file named Test.zip.
ByteArrayOutputStream bytestream=new ByteArrayOutputStream()
PDDocument doc = new PDDocument();
Splitter splitter = new Splitter();
//I can do this splitting of each page as PDDocument
List<PDDocument> splitDocs = splitter.split(doc);
doc.save(bytestream);
doc.close()
return bytestream;