I was trying to imply that $pdfid does not contain what you think it does. You should be able to do a simple file search for $pdfid to see where it was last modified. I highly doubt this is a browser issue.
Well, replacing these variables with hard-coded values produces exactly the same effect, so that rules that one out. It seems the problem is definitely elsewhere in this pile'o'code. Thanks for the thoughts anyway.