我想使用 Android pdf 库http://andpdf.sourceforge.net/,但我有同样的错误。日志:
ST='file 'no file selected' not found'
ST='reading page 1, zoom:1.0'
我的课程:
public class Reader extends PdfViewerActivity {
public int getPreviousPageImageResource() { return R.drawable.left_arrow; }
public int getNextPageImageResource() { return R.drawable.right_arrow; }
public int getZoomInImageResource() { return R.drawable.zoom_in; }
public int getZoomOutImageResource() { return R.drawable.zoom_out; }
public int getPdfPasswordLayoutResource() { return R.layout.pdf_file_password; }
public int getPdfPageNumberResource() { return R.layout.dialog_pagenumber; }
public int getPdfPasswordEditField() { return R.id.etPassword; }
public int getPdfPasswordOkButton() { return R.id.btOK; }
public int getPdfPasswordExitButton() { return R.id.btExit; }
public int getPdfPageNumberEditField() { return R.id.pagenum_edit; }
}
和
public class StartScreen extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
Intent intent = new Intent(this, Reader.class);
intent.putExtra(PdfViewerActivity.EXTRA_PDFFILENAME, "/sdcard/test.pdf");
startActivity(intent);
}
}