We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

open failed: ENOENT (No such file or directory) exception while creating pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

140979 Nov 16,2018 04:56 PM UTC Nov 20,2018 10:17 AM UTC Xamarin.Forms 3
loading
Tags: PDF
Reihaneh Khaksaran
Asked On November 16, 2018 04:56 PM UTC

Hi,

I am trying to create a pdf from my XAML, and followed the exact same instructions in the following link:

https://www.syncfusion.com/kb/9174/how-to-create-a-pdf-file-in-xamarin

but problem is that it doesn't create anything,! tried to debug the code and realized that in SaveAndroid class on the line  'FileOutputStream outs = new FileOutputStream(file);' it throws an exception, and here is the message: "/storage/emulated/0/Syncfusion/Output.pdf: open failed: ENOENT (No such file or directory)"

so, can you please help me with this issue?
I also had the same issue when I tried to run this sample:

Thanks in advance

KarthikeyanC [Syncfusion]
Replied On November 19, 2018 12:24 PM UTC

Hi Reihaneh, 

Thank you for contacting Syncfusion support. 

The ENOENT (No such file or directory) error may occur in application, If the application do not have storage permission. We suggest you to ensure whether the application has storage permission to read and write file in storage location. We have modified sample to provide storage permission at run time. Please find the sample below for your reference. 


Kindly refer below Xamarin link to provide permission for android application. 

Please let us know if you need further assistance in this. 
Regards, 
Karthikeyan  



Reihaneh Khaksaran
Replied On November 19, 2018 04:19 PM UTC

Hi,

Oh, you're right, sorry, problem solved, thank you so much
oh and one more question, where is the file saved? I searched my all the directories on my phone but couldn't find the generated pdf!! I'm just able to open it from whithin the application!

Best Regards,
Reihaneh

KarthikeyanC [Syncfusion]
Replied On November 20, 2018 10:17 AM UTC

Hi Reihaneh, 
The PDF file is saved in android platform using SaveTextAsync method from SaveAndroid class and it is included in Android project. In the SaveTextAsync method we are creating folder name with Syncfusion and inside the folder the PDF file is created.  You can find the output PDF file “/storage/emulated/0/Syncfusion/Output.pdf” in this location. 
 
Please let us know if you need further assistance on this. 

Regards,
 
Karthikeyan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;