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.
Unfortunately, activation email could not send to your email. Please try again.

Finding Difficulty in Getting Started

Thread ID:

Created:

Updated:

Platform:

Replies:

132352 Aug 28,2017 07:18 AM Aug 28,2017 01:24 PM Xamarin.Forms 1
loading
Tags: PDF
ronak
Asked On August 28, 2017 07:18 AM

I tried getting started blog but was not able to create a pdf 

i want a simple solution i.e get value from text box and store it in pdf.

and also let me know where the pdf file is stored and how can i change the location 


Chinnu Muniyappan [Syncfusion]
Replied On August 28, 2017 01:24 PM

Hi Ronak, 
 
Thank you for contacting Syncfusion support. 
 
We have created a simple sample for adding textbox value to PDF document in Xamarin platform. The generated output PDF documents are stored in the following locations. 
 
Android: 
            if (Android.OS.Environment.IsExternalStorageEmulated) 
            { 
                root = Android.OS.Environment.ExternalStorageDirectory.ToString(); 
            } 
            else 
                root = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); 
 
            Java.IO.File myDir = new Java.IO.File(root + "/Syncfusion"); 
            myDir.Mkdir(); 
 
            Java.IO.File file = new Java.IO.File(myDir, fileName); 
 
IOS: 
            string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal); 
            string filePath = Path.Combine(path, filename); 
 
UWP: 
                StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder; 
                StorageFile outFile = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting); 
                using (Stream outStream = await outFile.OpenStreamForWriteAsync()) 
                { 
                    outStream.Write(stream.ToArray(), 0, (int)stream.Length); 
                } 
 
Here we have using dependency services for storing the PDF files in each platform (Android, IOS and UWP), so you can change your storage location by using the dependency service Save method. Please refer the below sample for more details. 
 
 
Please let us know if you have any concern. 
Regards, 
Chinnu 


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.

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.

;