Thanks for the quick response Dan, that solution is correct, but Steve beat
you to the punch. :)

> -----Original Message-----
> From: Dan Muey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 24, 2003 11:35 AM
> To: Levon Barker; [EMAIL PROTECTED]
> Subject: RE: Perl + Oracle + Blobs + PDFs - Dumping to filesystem
>
>
> > while ($sth->fetch()) {
> >         open FH, ">$binObjId.pdf";
> >         print FH, $contents;
> >         close FH;
> > }
> >
> > That almost works.
> >
> > After this runs on a coulple of files, I try to open one, and
> > the PDF reports that the file is damaged and also none of the
> > jpgs that were embedded in the PDF show up. Acrobat tells me
> > that there is insufficient data to display the image.
> >
> > So I am guessing that 'print FH, $contents' is a bad way to
> > get the pdf to the file system.
> >
>
> You need to writre it in binary mode:
>
> open FH ...
> binmode FH;
> print FH ......
>
> perldoc -f binmode
>
> HTH
>
> DMuey
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to