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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...