> 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]

Reply via email to