Levon,

  Great!  Glad that worked out.

Steve

On Thu, Jul 24, 2003 at 11:39:58AM -0400, Levon Barker wrote:
> Thanks Steve,
> 
> That was the solution.
> 
> Cheers,
> Levon Barker
> 
> > -----Original Message-----
> > From: Steve Mayer [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, July 24, 2003 11:41 AM
> > To: Levon Barker
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Perl + Oracle + Blobs + PDFs - Dumping to filesystem
> >
> >
> > Levon,
> >
> >   You might try using the binmode function on your filehandle:
> >
> >     open FH, ">$binObjId.pdf";
> >     binmode FH;
> >     print FH, $contents;
> >     close FH;
> >
> >
> > Steve
> >
> > On Thu, Jul 24, 2003 at 11:26:52AM -0400, Levon Barker wrote:
> > > Hello List!
> > >
> > > Have a quick question that I am sure someone knows the answer to. I
> > > switching from handling long raw data in Oracle to only storing
> > a pointer to
> > > the file on the file system. I am dealing mostly with PDFs.
> > >
> > > The process seems/ed pretty easy: select the contents of the
> > longvar column
> > > into a perl variable and then save it to the file system.
> > > So I do something like this:
> > >
> > > 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.
> > >
> > > Any thoughts?
> > >
> > > Thanks in advance,
> > > Levon Barker
> > >
> > >
> > > --
> > > 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]
> >
> 
=============================================================
Steve Mayer                             Oracle Corporation
Project Lead                            1211 SW 5th Ave.
Portland Development Center             Suite 900
[EMAIL PROTECTED]               Portland, OR 97204 
Phone:  503-525-3127
=============================================================

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

Reply via email to