delagoutte Posted April 12, 2017 Share Posted April 12, 2017 i replied to jahlxx who have a problem with QuickReport Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 17, 2017 Author Share Posted April 17, 2017 Hi. Sorry for the delay. I have benn using SynPDF, but now, I've updated to QR6 Pro, and don't need. I gerenerate PDF, from QR directly now. But in prior version, I had this, tested, and works: procedure Tlib.rptpdf(rep: tquickrep);var i: integer; aMeta: TMetaFile; xpdf: tpdfdocument; xreport: string;begin xpdf := tpdfdocument.create; xpdf.defaultpapersize := psA4; xpdf.defaultpagelandscape := false; rep.prepare; for i:= 1 to rep.QRPrinter.PageCount do begin xpdf.AddPage; aMeta := rep.QRPrinter.GetPage(i); try xpdf.Canvas.RenderMetaFile(aMeta,1,0,0); finally aMeta.Free; end; end; xreport := 'filename.pdf'; xpdf.SaveToFile(xreport); UniSession.SendFile(xreport,xreport); xpdf.Free;end; I hope this help you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.