Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
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 7 years 4 months ago #11474

  • pfrank
  • pfrank's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • 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 7 years 4 months ago #11480

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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 7 years 4 months ago #11483

  • pfrank
  • pfrank's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • 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