I once Zipped and BinHex’ed a file then placed it into a PostgreSQL TEXT field. I added it to the field through a series of append commands, in case the file was very large.
It is not desirable for many reasons (eg database is HUGE, backups very slow, a crash takes down everything), so I have moved to storing the files beside the database (eg AWS Bucket, FTP or CubeSQL FILE UPLOAD …).
So is the PDF file inside a field of the PostgreSQL table or not? We seem to be trying to solve two issues here: can you store a PDF file INSIDE your database and can you display a PDF within a Web2 iFrame. Which needs to be solved, one or both?