Thanks for all the responds.
It really is a specific problem with this pdf. With some other pdf files my code works well. So I can say it's preety much "solved".
I'm still looking for a different option that doesn't force me to save the pdf file before opening it again for the parsing.