Jump to content

Recommended Posts

Posted

Hi,

Saving the stream file as PDF occurs smoothly in the VCL project. PDF file is problem in unigui project with the same codes. What could be the source of this problem?

Thank you.

Posted
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;

 

Posted
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.

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...