ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnView.PdfViewer to and from database blobs

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
kowal Posted - Oct 15 2024 : 09:40:07
Hello,

I'd like to save and read the documents in PDF format in the database BLOB fields
using TImageEnView.PdfViewer but I'm not sure if it's possible and how to try to do it.
Can I get some information about it?

regards
S. Kowalski
3   L A T E S T    R E P L I E S    (Newest First)
kowal Posted - Oct 18 2024 : 08:29:12
Hello
thanks for advice - it works OK

Here is the snippet of my code

var bstream: TStream;
begin
       
  bstream := dset.CreateBlobStream(fld, bmRead);
  
  try
    imageEnView.PdfViewer.Enabled := True;
    imageEnView.PdfViewer.LoadFromStream(bstream);
  finally
    bstream.Free;
  end;
end;


S.Kowalski
xequte Posted - Oct 16 2024 : 19:28:25


Nigel
Xequte Software
www.imageen.com
JonMRobertson Posted - Oct 15 2024 : 16:28:35
One way would be to create a stream for the BLOB field and LoadFromStream. Something similar to this (adhoc code, untested):

  var bsPDF := TBlobStream.Create(fldBlob);
  try
    ImageEnView1.PdfViewer.Enabled := True;
    ImageEnView1.PdfViewer.LoadFromStream(bsPDF);
  finally
    bsPDF.Free;
  end;


Note that you DO need to create and destroy TBlobStream for each row/record.