我有大量文件,其中一些是扫描图像为 PDF,一些是完整/部分文本 PDF。
有没有办法检查这些文件,以确保我们只处理扫描图像的文件,而不是完整/部分文本 PDF 文件?
环境:Python 3.6
我的代码是:
public class MainActivity extends Activity {
// Log tag
private static final String TAG = MainActivity.class.getSimpleName();
// Movies json url
private static final String url = "http://api.androidhive.info/json/movies.json";
private ProgressDialog pDialog;
private List<Movie> movieList = new ArrayList<Movie>();
private ListView listView;
private CustomListAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
listView = (ListView) findViewById(R.id.list);
adapter = new CustomListAdapter(this, movieList);
listView.setAdapter(adapter);
pDialog = new ProgressDialog(this);
// Showing progress dialog before making http request
pDialog.setMessage("Loading..."); …
Run Code Online (Sandbox Code Playgroud)