Hello Micam
If you're a bit of a hack on your computer, and to put it simply, there's a program called PDFtoMUSIC from Myriad, which lets you listen to and create a MIDI file
ATTENTION this only works with a PDF created from a music composition program such as MuseScore, Harmony, Melody assistant etc....
If it's a scanned PDF or an extract from a music book, it won't work, as the software considers the PDF as an image
There is a free version (limited to one page) and a paid version.
I hope I've answered part of your question.
Kind regards