pro_imaj Posted November 25, 2020 Share Posted November 25, 2020 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. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 25, 2020 Administrators Share Posted November 25, 2020 Make sure you set the Stream.Position := 0 before saving it. Link to comment Share on other sites More sharing options...
pro_imaj Posted November 25, 2020 Author Share Posted November 25, 2020 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 More sharing options...
Administrators Farshad Mohajeri Posted November 25, 2020 Administrators Share Posted November 25, 2020 What is the ETTN variable and how is it populated? What is Cevap parameter? Probably we need a test case for this. 1 Link to comment Share on other sites More sharing options...
pro_imaj Posted November 26, 2020 Author Share Posted November 26, 2020 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 More sharing options...
Administrators Farshad Mohajeri Posted November 26, 2020 Administrators Share Posted November 26, 2020 Thanks for update. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now