Try doing a fsockopen instead?
I am not sure, but it seems like I remember something about ding binary reads on files and storing them in a database.
Check google for:
php binary read
php store image in database ( same idea here, just manipulate for pdf)
and zend for
fsockopen
Hope this helps