flexdev Posted November 10, 2020 Share Posted November 10, 2020 Hello, I have to create a unigui application that has to download pdf files generated by another unigui application sent via unisession.sendfile (which runs on a different server). If I try to download them directly from the browser I get the correct pdf files, if I try to download them via: var IdHTTP1: TIdHTTP; Stream: TMemoryStream; Url, FileName: String; begin Url: = 'http://192.168.69.116:8077?callback=PDF'; Filename: = 'download.pdf'; IdHTTP1: = TIdHTTP.Create (Self); Stream: = TMemoryStream.Create; try IdHTTP1.Get (Url, Stream); Stream.position: = 0; Stream.SaveToFile (FileName); finally Stream.Free; IdHTTP1.Free; end; i get not the pdf but a text file. Where am I doing wrong? Thank's in advance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.