title: Public class not public?
body: <p>Im trying to use parts of this code : <a href="https://github.com/androidsrc/PdfReadWrite/tree/master/app" rel="nofollow noreferrer">https://github.com/androidsrc/PdfReadWrite/tree/master/app</a></p>
  
  <p>More precisely this part:</p>
  
  <pre><code>   public class PdfGenerationTask extends AsyncTask&lt;Void, Void,String&gt;{
  
          protected String doInBackground(Void... params) {
              PdfDocument document = new PdfDocument();
              View author = findViewById(R.id.author);
              int pageNumber = 1;
              PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo().Builder(20,20,pageNumber).create();
              PdfDocument.Page page = document.startPage(pageInfo);
              author.draw(page.getCanvas());
              document.finishPage(page);
              String pdfName = "pdfdemo";
              File outputFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS));
              try {outputFile.createNewFile();
                  OutputStream out = new FileOutputStream(outputFile);
                  document.writeTo(out);
                  document.close();
                  out.close();
  
          }
              catch (IOException e) {
                  e.printStackTrace();
              }
              return outputFile.getPath();
      }
  </code></pre>
  
  <p>When I run the program in Android Studio I get several error messeges, the first one is: <code>Error:(44, 45) error: PageInfo() is not public in PageInfo; cannot be accessed from outside package</code>. I have changed the PdfGEneration task to public, but that doesnt seem to fix the problem. What am I supposed to do instead, and why? </p>
  
  <p>The second error is that this one: <code>Error:(49, 31) error: no suitable constructor found for File(File)
  constructor File.File(String) is not applicable
  (argument mismatch; File cannot be converted to String)
  constructor File.File(URI) is not applicable
  (argument mismatch; File cannot be converted to URI)</code>
  What is the problem here? What can I do to fix that problem?</p>