Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread extracting compressed pdf
Thu, May 18 2006 1:14 PMPermanent Link

John
I  have an existing table in version 3.0 format that contains a blob field which contains a compressed pdf file. How do I extract that pdf from the blob field into a readable pdf file?

Thanks
Thu, May 18 2006 2:03 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

John


Something like

TMemoField(FilAttMgr.FieldByName('_Item')).SaveToFile(PutTo);

will save it to disk and

ShellExecute(Application.Handle, nil, Pchar(#34 + PutTo + #34), nil, nil, SW_SHOWNORMAL);

will display it.

Roy Lambert
Thu, May 18 2006 3:52 PMPermanent Link

"Mike Shkolnik"
blob := yourDataset.CreateBlobStream(yourDataset.FieldByName('YOUR_BLOB'),
bmRead);
try
 blob.Seek(0, soFromBeginning);

 with TFileStream.Create('c:\your_name.pdf', fmCreate) do
   try
     CopyFrom(blob, blob.Size)
   finally
     Free
   end;
finally
 blob.Free
end;

--
With best regards, Mike Shkolnik
E-mail: mshkolnik@scalabium.com
WEB: http://www.scalabium.com
"John" <tswitz00@aol.com> wrote in message
news:064562C8-1904-4FE3-B206-D09576B16B1B@news.elevatesoft.com...
> I  have an existing table in version 3.0 format that contains a blob field
which contains a compressed pdf file. How do I extract that pdf from the
blob field into a readable pdf file?
>
> Thanks
>

Thu, May 18 2006 6:11 PMPermanent Link

John
Thanks for the reply, I think that will do it.
Image