Hi
I am Pretty new to syncfusion.
I want to create a PDF in a Xamarin.Forms app and used the Documentation (
Docu)
But the dependency of ISave on iOS does not work.
It does not seem to know the QLPreviewItemBundle and the PreviewControllerDS classes.
I use the Syncfusion.Xamarin.Pdf V16.2.0.42 on VS2017E.
Are These classes not used anymore?
-----------------------------------------------------------------------------CODE--------------------------------------------------------------------------------
public async Task Save(string filename, string contentType, MemoryStream stream)
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
string filePath = Path.Combine(path, filename);
try
{
FileStream fileStream = File.Open(filePath, FileMode.Create);
stream.Position = 0;
stream.CopyTo(fileStream);
fileStream.Flush();
fileStream.Close();
}
catch (Exception e)
{
}
UIViewController currentController = UIApplication.SharedApplication.KeyWindow.RootViewController;
while (currentController.PresentedViewController != null)
{
currentController = currentController.PresentedViewController;
}
UIView currentView = currentController.View;
QLPreviewController preview = new QLPreviewController();
QLPreviewItem item = new QLPreviewItemBundle(filename, filePath);
preview.DataSource = new PreviewControllerDS(item);
//UIViewController uiView = currentView as UIViewController;
currentController.PresentViewController(preview, true, null);
}