Hi Adeem,
Thanks you for using Syncfusion product.
We have created a simple sample which loads and display the PDF document in our PDF viewer Xamarin Forms (iOS/Android). Please find the sample from the following link,
XAML Design:
Please find the xaml design page which describes adding the PDF viewer control to a Grid.
<Grid >
<sfpdfviewer:PdfViewerControl x:Name="pdfViewerControl"/>
</Grid>
|
C# Code:
The below code example is for loading the PDF document in the PDF viewer control.
protected override void OnAppearing()
{
base.OnAppearing();
var fileStream = typeof(App).GetTypeInfo().Assembly.
GetManifestResourceStream("GettingStarted_PDFViewer.Assets.GIS Succinctly.pdf);
// Loads the PDF document in PDF viewer control.
pdfViewerControl.LoadDocument(fileStream);
}
|
Note: We are recommending to load the PDF document in the OnAppearing Method.
We have also published the Xamarin Store PDF viewer getting Started documentation which explain the step by step procedure for Viewing the PDF document in PDF viewer Xamarin Forms. Kindly refer the following link for more details on the component.
Please try the above sample and the code snippet in your project and let us know if you face any problems in adding the PDF viewer control.
Thanks,
Balasubramanian S