java - I need to convert PDDocument to File Object -


i trying split pdf document through org.apache.pdfbox.multipdf.splitter , need perform file operations on single page pddocument,

how can convert pddocument file object in java?

with apache commons

   inputstream = null     try {      pddocument document = pddocument.load(filepath);      file targetfile = new file("nameoffile.pdf");      pdstream ps = new pdstream(document);      = ps.createinputstream();      fileutils.copyinputstreamtofile(ps.inputstream(), targetfile);     } catch (ioexception io) {} {      if (is != null)       ioutils.closequietly(is);     } 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -