Posted By

markt22 on 09/27/17


Tagged

PDFBox


Versions (?)

PDFBox: Remove first page of a document


 / Published in: Java
 

Opens a PDF Document, removes the first page and then saves the document

  1. /**
  2.  * @param args the command line arguments
  3.  * @throws java.io.IOException
  4.  */
  5. public static void main(String[] args) throws IOException {
  6. File file = new File("");
  7. PDDocument doc = PDDocument.load(file);
  8.  
  9. doc.removePage(0);
  10.  
  11. doc.save("");
  12. }

Report this snippet  

You need to login to post a comment.