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. Image for the cookie policy date

Finding Difficulty in Getting Started

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 


1 Reply

CM Chinnu Muniyappan Syncfusion Team August 28, 2017 05:24 PM UTC

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 


Loader.
Up arrow icon