Xamarin: Can we use Ghostscript to display PDF on android - android

I have a problem rendering PDF on Android pre-SDK 21. I know SDK 21, android have PDFRender to render PDF but for pre-SDK 21 I have no way to generate the PDF apart from either using third party application or using google doc.
There is a ghostscript i have used before on MVC project. It generate the images from the PDF. Does it still work on Xamarin as well.

There are multiple solutions available that work on Android before api level 21.
You can use Xamarin.PDFView which uses pdf.js to show the pdf file.
Another option is Xamarin.PdfView.Android library which is a wrapper for java pdf view library.
One more option is MuPDF-for-Xamarin-Android which is a wrapper for java MuPDF library.

Related

PDF reader plugin for android

I'm trying to make a online PDF library app. I need a PDF reader plugin. If anyone know any reader, then please help me.
Google is your friend in this situation.
There is a handy library for reading and displaying PDFs in a view
AndroidPdfViewer 1.x is available on AndroidPdfViewerV1 repo, where
can be developed independently. Version 1.x uses different engine for
drawing document on canvas, so if you don't like 2.x version, try 1.x.
Library for displaying PDF documents on Android, with animations,
gestures, zoom and double tap support. It is based on PdfiumAndroid
for decoding PDF files. Works on API 11 (Android 3.0) and higher.
Licensed under Apache License 2.0.
it is located here https://github.com/barteksc/AndroidPdfViewer
If you however want a solution that will be ideal across android, windows and iOS devices http://www.radaeepdf.com/ might be more up your street
RadaeePDF SDK helps you to build better mobile applications. Using our
featured PDF reader engine's API and its set of professional features
is now a quick and simple procedure.
RadaeePDF SDK extends your App's features with stunning PDF
capabilities on smartphones, tablets, notebooks, convertibles,
desktops.
Main RadaeePDF SDK' features: PDF rendering engine for Android iOS
Windows 10 operating systems, PDF annotation, PDF creation, PDF
multimedia support.
RadaeePDF SDK supports also Xamarin and Cordova development targeting
Android and iOS.

Looking for an embed webview on android application

I am working on a Android application which is using webview as the main UI. (I don't use Cordova in this project.) The problem of the webview is that it gives different behaviors on running on different android devices. Some devices don't support latest features of javascript or css. In order to unify them I am looking for a solution to embed a webview inside my android application. I see crosswalk may be a good solution for me to choose. But I am not sure whether it is the best one. Is there any other frameworks support the same solution? My requirement is described below:
The current android project is created under Android Studio and use gradle to build the application. I want to keep that when using embed webview.
the solution should not require a lot of structure changes on my android application.
It could run on most of android devices. Ideally support android 4.4 and above.
The embed webview can be easily enabled/disabled.

Previewing and Opening PDF Documents in Android SDK like IOS SDK

For PDF files ios platform has UIDocumentInteractionController controller and UIDocumentInteractionControllerDelegate to open PDF documents in another application like evernote, dropbox, google drive etc. Is there a way like this for android platform? I found a sample for IOS in here but could not find a sample for Android.
Thanks.
I strongly recomend you look at MuPDF. This is open source project so you are free to integrate mupdf with your project, as well modify and distribute it. Developer say that muPdf is small, fast, and yet complete. And it's completly true!
But integrate MuPDF with existing android project is not easy. Here a few useful links:
Official docs
also look here
how to use with existing android project
Hope it help you
Not used this but you can try it ..
https://github.com/JoanZapata/android-pdfview

How to create our own PDF viewer for Android?

I want to build a PDF reader/viewer that could be used in my Android application, but I can't use Google docs to read my content. I can't use any PDF reader already installed in my device. It should be within my app and do not expose my secure content over the Internet.
What could I possibly use? Do I have to use the Android native dev kit to create my own viewer?
I'd recommend considering MuPDF which has already been ported for use on Android several times without reliance on Java. MuPDF is optimized for lightweight on-screen PDF rendering, making it perfect for mobile use.
Please note that MuPDF and all the derived projects are not suitable for the commercial use and you should consider alternatives if you are not developing an open source GPL project.
You will need pdf parsing libraries in JAVA... Parse the document, and display content in android. Below are some useful links :
http://java-source.net/open-source/pdf-libraries
http://itextpdf.com/
http://itextpdf.com/examples/iia.php?id=275
Advanced PDF parser for Java
There is an api in java, not sure if it is supported in android, but if possible.
You can use iText Api to read and write pdf documents in your application, and it does not require a pdf viewer is installed on the device.
There are opensource code available code.google.com/p/apv , andpdf.sourceforge.net/
You have to integrate this in your app there is no other direct way for do that.
I think you can use iText library to read the PDF in android.
Here are the few links for that
How to read a pdf using itext library in android
Not able to run simple program of iText library in android

SVG support on Android, current status

Does Android support SVG (natively)?
I found old answers here or on the web, but I don't understand the current situation.
Please give a reference if possibile.
Does Android support SVG (natively)?
That depends on what you mean by "Android", "SVG", and "natively".
Android is a mobile operating system. It has multiple versions.
SVG is a standard. It has multiple versions.
"Natively" could mean anything from "I can decode SVG through some Java classes" to "the stock Android Web browser can render SVG".
I can tell you that the stock Android Web browser renders this Web page fine on Android 3.2 and Android 4.0, but fails on Android 2.3.
I can tell you that there is no SVG parser set of Java classes, and that ImageView and similar widgets have no ability to work with SVG directly. You may be able to use WebView to display some SVG, given that the stock browser seems to support it on newer Android versions, though it's conceivable that the SVG support is via some plugin that is not automatically available to WebView.
I cannot tell you what version of SVG is supported by the browser, as that does not appear to be documented. You would need to run some tests and see if it supports the particular SVG structures that you wish to use.
http://caniuse.com/#search=svg The android browser column shows the android version whose default browser will have SVG support. All versions 3.0 and above have basic SVG support.
You can see a comprehensive advanced feature breakdown on the same page.

Categories

Resources