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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...