Xamarin.iOS load file from documents folder - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC: Xamarin.iOS load file from documents folder

Xamarin.iOS load file from documents folder 1 year 11 months ago #11474

  • pfrank
  • pfrank's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Karma: 1
  • Thank you received: 0
Hi,

I'm working with the the Xamarin.iOS wrapper you provide. Is it possible to open a PDF file from the apps document folder? A path like this:
/var/mobile/Containers/Data/Application/773A1AD2-5906-420E-94B6-F86FFCA9ED11/Documents/test.pdf

I tried creating a PDFViewController as in your demo-app with this path, but the controller is always null.
Is this somehow possible?

Please Log in or Create an account to join the conversation.

Xamarin.iOS load file from documents folder 1 year 11 months ago #11480

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 512
  • Karma: 15
  • Thank you received: 56
Hi,

the "Show" method of RDPDFViewController can open a pdf file from a web url or from Documents directory.
To distinguish between web url and local path we use the standard file scheme "file://".
To open a pdf file from Documents directory, you can simply use this path: "file://your_file.pdf", if the pdf file is in a subfolder of Documents directory you have to use "file://subfolder/your_file.pdf"
The following user(s) said Thank You: pfrank

Please Log in or Create an account to join the conversation.

Xamarin.iOS load file from documents folder 1 year 11 months ago #11483

  • pfrank
  • pfrank's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Karma: 1
  • Thank you received: 0
Unfortunately I tried file:// + the absolute path I mentioned above, instead of the relative path from Documents directory.

So Thanks a lot!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum