Hi Ali,
Currently we don’t have support for PdfViewerControl in xamarin platform, we have logged the feature request internally, and we will update you once it has been implemented.
With Regards,
Praveen
Hi Ali,
We are not able to reproduce the issue in our side and we have attached sample project for your reference. Please try the sample and let us know the result.
1. Please find the code snippet to add the page in existing document.
Stream xmlStream = typeof(mainPage).GetTypeInfo().Assembly.GetManifestResourceStream("GettingStarted.Barcode.pdf");
PdfLoadedDocument document = new PdfLoadedDocument(xmlStream);
PdfLoadedPage page = document.Pages.Add() as PdfLoadedPage;
//Saves the document.
MemoryStream stream = new MemoryStream();
document.Save(stream);
2. We can import the page form the existing document instead of converting the whole document to image please find the code snippet.
Stream xmlStream = typeof(mainPage).GetTypeInfo().Assembly.GetManifestResourceStream("GettingStarted.Barcode.pdf");
PdfLoadedDocument document = new PdfLoadedDocument(xmlStream);
PdfDocument doc = new PdfDocument();
doc.ImportPageRange(document, 0, document.PageCount-1);
doc.Pages.Add();
//Saves the document.
MemoryStream stream = new MemoryStream();
doc.Save(stream);
Please try this workaround on your document and let us know the result, please send us your input document to investigate further in this.
With Regards,
Praveen