【发布时间】:2014-11-02 13:28:24
【问题描述】:
我想阅读 pdf 文件并在 TextView 上显示内容。可能吗 ?或者只是将 pdf 显示到 WebView 或 pdfViewer 中?
我想做,
public class MainActivity extends Activity {
private TextView showText;
String url="http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
showText= (TextView)this.findViewById(R.id.showtext);
showText.setText( ++ convertPdfTotext ++);
}
public void convertPdfTotext(View view)
{
}
}
【问题讨论】:
-
如果您从 pdf 中提取文本,那将会是一团糟。事实上,一团糟。使用某种 pdf 查看器。即使您以正确的顺序提取文本等,您也会丢失任何标记。
-
你可以在 webview 上打开 pdf 文件,如果你想阅读 pdf 文件而不是在文本视图上设置文本,你可以在文本视图上查看 pdf 文件
标签: android pdf-reader pdftotext