TMSFNCPDFLibrary error in Android

I try create a pdf file in Android 9,but I can see this error (see attach image).
In the runtime I get Android permission to Read and Write External memory

'android.permission.READ_EXTERNAL_STORAGE';
'android.permission.WRITE_EXTERNAL_STORAGE';

The code to create file get from your example:

 pth := TPath.GetSharedDocumentsPath + PathDelim;
  p := TTMSFNCPDFLib.Create;
  try
    nro := 35;
    p.BeginDocument(pth + 'test.pdf');
.
.
.
  p.EndDocument(True);
  finally
    p.Free;
  end;

Did you try a different path?

I fixed the problem.

Only need checked -> Secure File Sharing in -> Entitlement List options