title: pdfbox document.save() compilation error
body: <pre><code>package document;
  
  import java.io.IOException;
  
  import org.apache.pdfbox.pdmodel.PDDocument;
  import org.apache.pdfbox.pdmodel.PDPage;
  
  public class Adding_Pages {
  
     public static void main(String args[]) throws IOException {
  
        //Creating PDF document object 
        PDDocument document = new PDDocument();
  
        for (int i=0; i&lt;10; i++) {
           //Creating a blank page 
           PDPage blankPage = new PDPage();
  
           //Adding the blank page to the document
           document.addPage( blankPage );
        } 
  
        //Saving the document
        document.save("C:/PdfBox_Examples/my_doc.pdf");
        System.out.println("PDF created");
  
        //Closing the document
        document.close();
  
     }  
  } 
  </code></pre>
  
  <p>i am using above code for practive but my compiler says</p>
  
  <blockquote>
    <p>unreported exception COSVisitorException; must be caught or declared
    to be thrown document.save("mypdf.pdf");</p>
  </blockquote>