例如,如何下载PDDocument, PDDocument有10页,文档名称为Test,现在,如果PDF文档为Test1,Test2 ... Test10,则必须将其下载为zip文件,压缩文件名为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;