Gerardo Arana Posted July 19, 2021 Share Posted July 19, 2021 Hello, Anyone know how you can display a pdf stored in a blob field in firebird Link to comment Share on other sites More sharing options...
adragan Posted July 30, 2021 Share Posted July 30, 2021 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 More sharing options...
adragan Posted July 30, 2021 Share Posted July 30, 2021 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 More sharing options...
Recommended Posts