Introduction

This article demonstrates how to download PDF files into devices by tapping/clicking the link button in webview Xamarin Forms.

Prerequisites

How can we achieve this functionality?

We can achieve this functionality by the following steps.

Explanation

In the above image,

  1. Select “Cross-Platform” option from the left lane.
  2. Choose “Mobile App (Xamarin.Forms)” option for creating Xamarin Forms application.
  3. Choose the location on disk where you want to store your application on hard disk.
  4. Give some name to your project which is relevant to your task. In my case, I’m giving it as “DownloadPDF”.
  5. After clicking “OK” button, the project will be created.

Here, I am giving http://www.pdfpdf.com/samples.html as a source. Actually, it contains some sample PDF files. I will try to download that PDF file (s).

Output

Xamarin

Xamarin

Xamarin

To view full source code, please click here.

Thanks for reading the article.