PDFBox: Remove first page of a document


/ Published in: Java
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.