Mupdf のように商業利用に適さないライブラリがたくさんあることは知っています。私の会社は新興企業であり、多額の費用を支払う立場にありません。雑誌アプリに取り組んでいます。良いオープンソース ライブラリを提案できる人はいますか?単一のpdfをレンダリングするために使用するか、それが不可能な場合は、有料のもののどれを優先しますか? 前もって感謝します
1 に答える
0
Google ドキュメントで webview を使用できます。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView
android:id="@+id/wv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
WebView wv= (WebView) findViewById(R.id.wv);
wv.setVerticalScrollBarEnabled(true);
wv.setHorizontalScrollBarEnabled(true);
wv.getSettings().setBuiltInZoomControls(true);
wv.getSettings().setJavaScriptEnabled(true);
wv.setWebViewClient(new WebViewClient());
wv.loadUrl("https://docs.google.com/file/d/0B8ZDVNCvRWK8c3YzQVFaWjg1bEU/edit")//pdf uploaded to google docs. Some cases requires users to login and requires permission of the owner of the doc.
インテントを使用できます。携帯電話に PDF リーダー アプリケーションが必要です。
File file = new File("/sdcard/example.pdf");
if (file.exists()) {
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
}
catch (ActivityNotFoundException e) {
Toast.makeText(OpenPdf.this,
"No Application Available to View PDF",
Toast.LENGTH_SHORT).show();
}
http://code.google.com/p/apv/source/checkout。APV PDF ビューア
http://code.google.com/p/apdfviewer/ . APDF ビューア。
于 2013-03-21T06:34:22.570 に答える