I have tried the code
@Override
protected void onActivityResult(int requestCode, int resultCode,
@Nullable Intent data)
{
switch (requestCode)
{
case 10:
if (resultCode==RESULT_OK)
{
String path = data.getData().getPath();
path_disp.setText(path);
File file = new File(path);
PdfDocument pdf = new PdfDocument(file.getAbsolutePath(), null);
}
break;
}
}
but this gives me an error "PdfDocument() in PdfDocument cannot be applied to (java.lang.String , null)"