Hi @nicole - welcome to the community!
I'm fairly sure that the Salesforce API is streaming the PDF data back to you in a fashion similar to what is described here, meaning you have just one part of the file. The solution likely involves await
ing the result of your query in order to ensure that you have the entire document prior to converting it!