Since you’re using a model through Ollama, it’s worth checking if you’re hitting a context window limit, especially since you are requesting a full dump of the PDF’s content. By default, Ollama truncates input at 2048 tokens, even if the input is longer and the model itself could handle much larger contexts.
I discussed this over in this other thread, which provides the solution and a test case. It might be helpful for your issue as well.