By default, PdfViewer uses native Android PDF rendering to render the pages of the PDF document. It also provides options in both Xamarin.Forms Android and Xamarin.Android platforms to use Pdfium as an alternate, which is a third party open source PDF rendering engine. Using Pdfium rendering engine is the solution to overcome the defects in native Android PDF rendering.
Creating Pdfium binding library
To use Pdfium in your application, the Pdfium binding library is needed. A Pdfium binding library has already been created and it is available with the demo sample attached at the bottom of this article for your convenience.
The Pdfium binding project can also be created from the scratch using the steps below.
Using Pdfium binding library in the application project
Add a new class named “CustomPdfRenderer” to the android application project. This class must implement the ICustomPdfRenderer interface defined in the Syncfusion.SfPdfViewer.Android namespace.
Create an instance of the CustomPdfRenderer class and assign it to the CustomPdfRenderer property of the PdfViewer.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|