-2

I'm developing appilcation for iOS and Android using Xamarin. I found some information, but I can't fully understand, how can I show pdf.

Firstly, should I really pay for XFINIUM.PDF Mobile Standard Edition? As I understood, it is special Xamarin pdf viewer, but I can use default smartphone viewer, that will be shown in my app. Is it correct?

Secondly, I have some questions about pdf format. For example I have pdf file with standard aspect ratio. And I want to show it in square pages(for example). Does pdf have mechanism to rebuild content for another aspect ratio? And can I do it with Xamarin?

Blue
  • 22,608
  • 7
  • 62
  • 92
lenden
  • 800
  • 2
  • 14
  • 38
  • I work for the company that develops XFINIUM.PDF library (the product in your link). At this moment the library does not include a PDF viewer control, you should not purchase it if that is what you need. A PDF viewer control will be added in the future. – Mihai Iancu Nov 29 '14 at 14:29
  • @MihaiIancu so, is there no pdf viewer in Xamarin at all? – lenden Nov 29 '14 at 14:40
  • at this moment, in our product no. – Mihai Iancu Nov 30 '14 at 08:33
  • @MihaiIancu and what about this? http://forums.xamarin.com/discussion/631/open-a-pdf-with-the-built-in-pdf-viewer I mean Xamarin at all, not only xfinium. I didn't understood your answer because of some difference between Xamarin and Xfinium – lenden Nov 30 '14 at 09:48
  • You could also pay for https://components.xamarin.com/view/apitron-pdf-rasterizer powers many apps in all mobile stores – Hugo Moreno Jan 15 '15 at 07:11

2 Answers2

0

Before Android L there is no way to display PDF without using a 3rd party library. In iOS you can use the native document viewer using UIDocumentInteractionController. The class is exposed in Xamarin.iOS so you should be good to go on that one.

der_michael
  • 3,151
  • 1
  • 24
  • 43
0

The famous PSPDFKit which is there for Android and iOS now has a wrapper for xamarin. https://github.com/PSPDFKit/Xamarin-Android. Using this you can convert the .aar to a .ddl and use in visual studio.

If you're looking for free option, you can use the below approach which renders the pdf using PDF.js library from Mozilla and displays it in a webview. https://github.com/jenasubodh/Xamarin.PDFView

Kishath
  • 5,560
  • 4
  • 17
  • 22