To begin with, OpenSTA emulates browser traffic, it does not run a real browser. The only evidence you will have that the server has produced the PDF file is that a link to it, a url, will be returned as the result of a get or post. Next, when you click on that link, opensta records the browser fetching the file.
So, when playing back a script, you have to first be sure the file name of the pdf doesn't change... if it does, you need to correlate it. Next you find the GET statement that retrieves the PDF file. Consider either checking the status returned to be sure its 200 or perhaps loading the response (load response_info body on) and verifying the first few bytes to see if it contains the right text (something like %PDF should appear in the text).
So, when playing back a script, you have to first be sure the file name of the pdf doesn't change... if it does, you need to correlate it. Next you find the GET statement that retrieves the PDF file. Consider either checking the status returned to be sure its 200 or perhaps loading the response (load response_info body on