http://www.perlmonks.org?node_id=550782


in reply to extract pdf from blob

I addition to the other comments, I would add that a PDF is a really a binary file and commonly contains flate/or other filter type encoded compressed content stream(s). Make sure you use binmode on any filehandle that you use on pdf streams going into or out of the blob field.