Small example how to convert pdf file to images.
In this project im uses the pdf viewer library (https://github.com/JoanZapata/android-pdfview), but little bit changed. Removed problem with "file corrupted" issue in the library.
After click on image on the center of the screen you will be moved to choosing file, after choosing you will get image of first page of pdf file.
Read article which descibes this source code here - http://dajver.blogspot.com/2017/12/pdf.html