Thanks DonManfred. I am not trying to duplicate threads. I interpreted Erel's very last message this issue with Android 8.0 is a separate issue and should create a new thread, thus I am doing that.
I am using, or trying to use Fileprovider, although it could be that certain things are not done correctly, otherwise it should work, correct? I have no issue now writing the inputstream to Starter.rp.GetSafeDirDefaultExternal("shared"), but if trying to write the inputstream to Starter.Provider.SharedFolder, it would not write the pdf.
The question now is with Android 8.0 I am not able to open the saved pdf. You will find that in my code above, with sub OpenPDF2 I am trying to use FileProvider to open the saved pdf. Please help elaborate how to solve the problem. Thanks.