Is it possible to embed (without download) a PDF file in a one view bilingual Android app?
-
07-07-2021 - |
سؤال
Does anyone know if the following project is achievable for an Android app:
- One view only
- PDF file embedded
- PDF file read into the app (not into Adobe Acrobat)
- PDF file cannot be downloaded into the user's Android device
- Only zooming page needed (and support of the internal PDF's hyperlinks)
- Bilingual / the PDF file being different according to the user's personal language settings
That project is the twin one of a very simple bilingual iOS App consisting of a PDF file embedded in a UIWebview.
I searched a lot on the subject, and I can't really tell if that twin project is achievable. If so, would there be an example of it somewhere ?
Thanks very much !
المحلول
You can keep the file in Assets directory and you can use Asset Manager to access the file.
AssetManager assetManager = getAssets();
try {
InputStream tinstr = assetManager.open("myjpg.pdf");
mDefaultThumbnail = BitmapFactory.decodeStream (tinstr);
tinstr.close ();
} catch (IOException ioe) {
ioe.printStackTrace ();
}
لا تنتمي إلى StackOverflow