I am creating an app in appdesigner (R2019b) to quality check some data. The data is exported from another program as PDF files that contains a few pages of images of raw data (gait biomechanics and electromyography waveforms for each participant in our study). I would like for the app to open a PDF, allow the user to look through the PDF, interact with my app to tell the app which data is good or bad based on visual inspection of the PDF, then close the PDF and go to the next participant's PDF when the user clicks a "next" button in the app.
I was hoping to use:
fileName = 'P511_baseline.pdf';
[fid,msg] = fopen(fileName);
so that I could later close it with
but this doesn't seem to actually open the PDF for viewing, only for writing.
I was able to get the PDF to open for viewing using:
unix(['open "' fileName '" &']);
However, I haven't been able to figure out how to close it when opening it in this way. For some quality checking protocols, the user will need to check a few hundred PDFs so it would be best to be able to close them automatically from within the code, rather than the user closing them manually. Additionally, because some of the PDFs have very similar names (e.g. P511_baseline and P551_baseline), to reduce the chances that the user is looking at the wrong PDF when performing the quality check, it is essential that only one PDF is open at a time. Ideally, I would like to find a solution(s) that work for PC and Mac because this app will be used on both systems.
Most of the Matlab Answers I have seen so far are about reading data from PDFs. I do NOT need to read any data from the PDFs. I just want them to open so the user can look at them visually - this could be in a PDF application (e.g. Adobe Acrobat, Preview, etc.) or as some kind of image file within Matlab - but I do need the ability to open and close each one individually. I would appreciate any suggestions anyone has for how to do this!