Jump to content

TuniPdfFrame, display pdf stores in blob field


Gerardo Arana

Recommended Posts

  • 2 weeks later...

var

    pdf_name, fname : string;

    fs:TFormatSettings;

begin

.......................

//I think there is a newer function that generates a random name for files

 pdf_name:= 'Some_Name' + '_'+FormatDateTime('ddmmyyyynnss', Now(), fs)+'.pdf'; 

fname := UniServerModule.LocalCachePath + pdf_name;
 with YourTable do

         TBlobFile( FieldByName( 'The_Name_Of_The_Blob_Field' ) ).SaveToFile(fname);

UrlFrame.BeginUpdate;

UrlFrame.Url:=fname;

UrlFrame.EndUpdate;

end;

Pay attention to paths !

 

Link to comment
Share on other sites

1 minute ago, adragan said:

var

    pdf_name, fname : string;

    fs:TFormatSettings;

begin

.......................

//I think there is a newer function that generates a random name for files

 pdf_name:= 'Some_Name' + '_'+FormatDateTime('ddmmyyyynnss', Now(), fs)+'.pdf'; 

fname := UniServerModule.LocalCachePath + pdf_name;
 with YourTable do

         TBlobFile( FieldByName( 'The_Name_Of_The_Blob_Field' ) ).SaveToFile(fname);

UrlFrame.BeginUpdate;

UrlFrame.Url:=fname;

UrlFrame.EndUpdate;

end;

Pay attention to paths !

 

 

Link to comment
Share on other sites

×
×
  • Create New...