Jump to content

Stream file occurs incorrectly.


pro_imaj

Recommended Posts

15 minutes ago, Farshad Mohajeri said:

Make sure you set the Stream.Position := 0 before saving it.

I try this way again, the same, corrupted PDF file occurs.

      dosyayaz := TFileStream.Create
        (ExtractFilePath(UniServerModule.LocalCachePath) + ETTN + '.' + 'PDF',
        fmCreate);
      dosyayaz.Position := 0;
      dosyayaz.Write(Cevap.DocumentFile, Length(Cevap.DocumentFile));
      dosyayaz.Free;

 

Link to comment
Share on other sites

18 hours ago, Farshad Mohajeri said:

What is the ETTN variable and how is it populated?

What is Cevap parameter?

Probably we need a test case for this.

The problem is not with unigui. I solved the problem by changing the TByteSoapArray part to TByteDynArray in the pas file that occurs when the problem is imported with the WSDL service.

Thank you.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...